wez Tue Oct 14 20:18:54 2003 EDT Modified files: /php-src/ext/standard basic_functions.c Log: MFB Fix for #25825 Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.631 php-src/ext/standard/basic_functions.c:1.632 --- php-src/ext/standard/basic_functions.c:1.631 Thu Oct 9 04:10:37 2003 +++ php-src/ext/standard/basic_functions.c Tue Oct 14 20:18:53 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.631 2003/10/09 08:10:37 andrey Exp $ */ +/* $Id: basic_functions.c,v 1.632 2003/10/15 00:18:53 wez Exp $ */ #include "php.h" #include "php_streams.h" @@ -1024,6 +1024,14 @@ } # endif } +#ifdef HAVE_TZSET + /* don't forget to reset the various libc globals that + * we might have changed by an earlier call to tzset(). */ + if (!strncmp(pe->key, "TZ", pe->key_len)) { + tzset(); + } +#endif + efree(pe->putenv_string); efree(pe->key); } @@ -1423,7 +1431,7 @@ if (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)) { + if (!strncmp(pe.key, "TZ", pe.key_len)) { tzset(); } #endif
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php