Re: date(), time() different to system time
| From: | DL Neil | Date: | Tue, 05 Feb 2002 23:32:08 +0000 |
| Subject: | Re: date(), time() different to system time | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83655@lists.php.net to get a copy of this message | ||
Hey Anth,
> Hey guys,
=some of the better-looking amongst us are not guys (and then some of us are...)
> I'm running a RH7.2 box with apache 1.3.20 installed and php-4.1.1
> installed as a DSO.
>
> Everything is working fine, except that the output from any date() or
> time() references is 16 hours behind the system time (and hwtime) on the
> machine.
>
> The machine gets its time from an ntp server which is correct; this setup
> is similar for other boxes on the network which have no problems with the
> date or time in php being correct.
>
> If I output date('T') then the correct timezone (EST...I'm in Aus) is
> displayed, but any time or dates are 16 hours behind.
>
> Where does php read the time/date values from? Is there something I can
> tweak or something that I should look at to correct this? I know I could
> kludge around it in users php code by tacking an extra 16 hours onto each
> value but obviously that's not a good solution for a box which will be
> used by others!
>
> Any thoughts / headsup would be appreciated.
Check out the meaning of "EST".
Sixteen hours behind NSW, Australian time would make it New York time wouldn't it?
Rather than the three-character codes, check out the +or-nnnn settings in the date functions to
check that you
and your server are in the same time zone.
=dn