I can't seem to set the time zone of my server in the mod_php4
binary.  When I run this file:

<HTML><BODY><PRE>
<?php
echo "GMT:   " . gmdate( "D, j M Y H:i:s" ) . "<BR>";
echo "Local: " . date( "D, j M Y H:i:s" ) . "<BR>";
echo "Z:     " . date( "Z" ) . "<BR>";
echo "O:     " . date( "O" ) . "<BR>";
echo "T:     " . date( "T" ) . "<BR>";
echo "Env:   " . getenv("TZ");
?>
</PRE>
</BODY></HTML>


        ...I get this output in the web browser:

GMT:   Tue, 24 Dec 2002 14:14:51
Local: Tue, 24 Dec 2002 14:14:51
Z:     0
O:     +0000
T:     GMT
Env:   US/Eastern


        I asked on the mailing list for my OS (FreeBSD) and someone else
who was using the same version of the same OS (FreBSD 4.7-Stable) and the
same mod_php4 version (FreeBSD's port of PHP 4.2.3) was not experiencing
this issue.  His output was:

GMT:   Tue, 24 Dec 2002 15:14:40
Local: Tue, 24 Dec 2002 09:14:40
Z:     -21600
O:     -0600
T:     CST
Env:

        I've noticed two major changes here.  The TZ environment variable
is defined on my system but not his.  (Both of us have time zones defined
when we look in uname -a.)  My mod_php4 binary believes that it is GMT
(instead of EST) while his believes that it is in CST (which is correct).

        Can anyone offer any suggestions on how to fix this?  Or even
clues of what might be the cause?

                                                        Thanks in advance,
                                                        Jaime



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to