Justin, Take a look at the gettimeofday() function, which returns the timezone and daylight-savings-time values for the system.
-bsh Justin French wrote: >hi, > >when people add something to a table, i'm logging the time()... later, >when I pull it out, i'm doing something like date('d M Y',$stamp), which >all works fine, printing something like "21 Jan 2002". > >problem is, i'm on a server in canada, but 99% of my users will be in Australia. > >to get an idea of the time difference, I made a simple php file called >time on both my local test server and the live server: > ><? > >$stamp = time(); >echo $stamp."<BR>"; >echo date('d M Y H:m:s', $stamp); > >?> > >I ran both scripts within 5 seconds of each other, and got the following: > >local: >1014261839 >21 Feb 2002 14:02:59 > >live: >1014260440 >20 Feb 2002 21:02:40 > > >So, if I look at the second line of the output, they're about 17 hours >behind me, but if I look at the first line [time()] (according to the >manual, the number of seconds since that date in 1970 i think), I get a >way different result: > >1014261839 - 1014260440 = 1399 seconds difference, about 23 minutes. > > >I want to be able to determine the $difference between the two stamps in >seconds, then do something like: ><? >echo date('d M Y',$stamp - $difference); >?> > > >Seems easy enough, but 1399 doesn't seem right to me!!!!! > >Where have I lost the plot??? > > >Justin French >http://indent.com.au >http://soundpimps.com > -- ======================================================================= Billy S Halsey Software Problem Resolution ESP Solaris Software Email [EMAIL PROTECTED] Sun Microsystems, Inc -NO DAY BUT TODAY- ======================================================================= -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php