ID: 22135 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Date/time related Operating System: Linux (debian) PHP Version: 4.2.3 New Comment:
Using tzselect on Debian leads to the assumption that your TZ variable should probably be "America/Los_Angeles" (with underscore). Can you test that, please? Previous Comments: ------------------------------------------------------------------------ [2003-02-09 00:56:15] [EMAIL PROTECTED] <? print("server timezone is: " . getenv('TZ') . "<br>\n"); print("server time is: " . date("F j, Y, g:i a") . "<br>\n"); print("changing server time zone to US/Pacific....<br>\n"); putenv("TZ=US/Pacific"); print("new server time is: " . date("F j, Y, g:i a") . "<br>\n"); print("new server timezone for this script is: " . getenv('TZ')); ?> The above script gives the following output: server timezone is: America/Los Angeles server time is: February 9, 2003, 6:45 am changing server time zone to US/Pacific.... new server time is: February 8, 2003, 10:45 pm new server timezone for this script is: US/Pacific the correct date and time in Los Angeles at the time of running the script is: February 8, 2003, 10:45 pm The date command on the system gives the correct time and date. /etc/timezone contains US/Pacific setting environment variable TZ=US/Pacific before restarting apache has no effect on the above script. PHP configure line: './configure' '--with-mysql' '--with-apxs' '--with-config-file-path=/etc/php4/apache' '--enable-track-vars' '--enable-trans-sid' '--with-sybase=/usr/local/freetds' '--with-ldap' '--with-imap' '--with-curl=/usr' '--with-pgsql=/usr/include/postgresql' '--with-gd' '--with-xml' '--enable-cli' Apache/1.3.26 Apache modules are: mod_php4, mod_ssl, mod_perl, mod_dav, mod_setenvif, mod_unique_id, mod_expires, mod_auth, mod_access, mod_rewrite, mod_alias, mod_userdir, mod_cgi, mod_dir, mod_autoindex, mod_status, mod_negotiation, mod_mime, mod_log_config, mod_macro, mod_so, http_core This could be a problem with the underlying debian (2.2.19 kernel) system, but I thought I should report it. Thank you. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22135&edit=1