PHP 4.0 Bug #7203: Lack of calling tzset() in some php internal code

From: Date: Sat, 14 Oct 2000 08:27:04 +0000
Subject: PHP 4.0 Bug #7203: Lack of calling tzset() in some php internal code
Groups: php.dev 
Request: Send a blank email to php-dev+get-34994@lists.php.net to get a copy of this message
From: christian.robert@polymtl.ca Operating system: Linux Slackware 7 PHP version: 4.0.3 PHP Bug Type: Date/time related Bug description: Lack of calling tzset() in some php internal code I recently found a problem on a php piece of code who looks like: putenv("TZ=$Some_TZ"); // Like "EST5EDT" $val= strftime("%Z"); echo "Timezone = ".$val; It sometimes get the right value, sometimes some "near" garbage values. Not repeateable (at random under apache). it looks like that under standard linux(glibc2), all "time" related function should call "C" function tzset() before first usage. I see in the source that: _php_mktime() is calling tzset() #if HAVE_TZSET the strftime() function need this too (for linux at least) thanks, Xtian. -- Edit Bug report at: http://bugs.php.net/?id=7203&edit=1

« previous php.dev (#34994) next »