From e247b206e07fddb7e6d34c5e67589c25d53d2782 Mon Sep 17 00:00:00 2001 From: foobar Date: Tue, 9 Jan 2001 09:02:21 +0000 Subject: [PATCH] If TZ environment variable is changed call tzset(). # Although man page for tzset() says it should be called automaticly # by some of the time related functions, IRL this doesn't happen. # PR: 3977, 4732, 5510, 6972, 7203, 8502, 8609 --- ext/standard/basic_functions.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index a59ed605f7..90f425b958 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -1059,6 +1059,9 @@ PHP_FUNCTION(putenv) if ((ret=putenv(pe.putenv_string))==0) { /* success */ zend_hash_add(&BG(putenv_ht),pe.key,pe.key_len+1,(void **) &pe,sizeof(putenv_entry),NULL); +#ifdef HAVE_TZSET + if(!strncmp(pe.key,"TZ",2)) tzset(); +#endif RETURN_TRUE; } else { efree(pe.putenv_string); -- 2.50.1