Jeff Sheltren wrote:

> Well, what you are missing is that those are the number of seconds *on that
> machine* since 1970...  so actually, if both of your clocks were set
> correctly, you should be getting the *same* number returned by
> time().  Hope that clears it up a little.

Ahhhh geez *slaps forehead*.

okay, so the time stamps should be *close* to equal, and the difference
between the two machines is about 23 mins, so that's okay, but:

when I run
echo date('d M Y H:m:s','1014261839');

on the two machines, I get different results.

local: 21 Feb 2002 14:02:59
live:  20 Feb 2002 21:02:59

this is a difference of exactly 17 hours, so what is date() taking into
consideration?  the timezone of the server?


if i'm putting timestamps into my database (in canada, apparantly 17
hours behind me), I just need to know what I need to do to that
timestamp before running it thru date() to get my local time
(melbourne/sydney) printed to the page.


thanks,

jsutin french



> Jeff
> 
> At 03:18 PM 2/21/2002 +1100, Justin French wrote:
> >It doesn't seem to me like this is an issue... isn't the timestamp just
> >the local unix time?  It is on my LAN server.
> >
> >The issue I have is that
> >
> >echo date('d M Y H:m:s','1014261839');
> >produces 21 Feb 2002 14:02:59 on my LOCAL machine
> >
> >echo date('d M Y H:m:s','1014260440');
> >produces 20 Feb 2002 21:02:40 on my LIVE server.
> >
> >this is a difference of around 17 hours (i ran both scripts within 5
> >seconds of each other)
> >
> >however 1014261839 - 1014260440 = just 1399 seconds.
> >
> >
> >so where am I going wrong?
> >
> >there's either an issue with:
> >
> >a) time()
> >b) date()
> >c) the subtraction of one timestamp from another
> >
> >that i'm not aware of.
> >
> >
> >justin
> >
> >
> >
> >Billy S Halsey wrote:
> > >
> > > Justin,
> > >
> > > Take a look at the gettimeofday() function, which returns the timezone
> > > and daylight-savings-time values for the system.
> > >
> > > -bsh
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

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

Reply via email to