Jump to content


Photo

Unix timestamp Firefox differs from IE


  • Please log in to reply
3 replies to this topic

#1 Marijnn

Marijnn
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 09 July 2006 - 07:21 PM

Hi,

I've noticed a strange difference between browsers regarding the PHP time() function. Whenever I access a file (just: <?php echo time(); ?>, no more than that) on my server (not my local server), it returns different timestamps in Firefox and Internet Explorer, a difference of about 45 seconds (I don't know it exact though; I can't refresh both browsers at the same time). If I try the same file on my server running local, both timestamps do match. Is this a problem of my host or am I doing something wrong? Is there another time-function I could use (actually, I don't care whether it's a Unix timestamp or something like that, as long as it doesn't have the strange difference) to try?

http://www.wireweaving.com/time.php

Thanks in advance..


#2 micah1701

micah1701
  • Members
  • PipPipPip
  • Advanced Member
  • 613 posts
  • LocationEllington, CT USA

Posted 09 July 2006 - 08:10 PM

i'm not able to replicate your error using both IE and FF. they seem to be the same, which makes sence because the time is being generated server side before it is sent to the client side broswer.

I suppose if you really wanted to test it you could add a javascript to your test page that tells the page to refresh at a given time -- javascript uses the time on your local computer, so theoretically, both of your browsers will reload at the exact same time (based on the clock in your local system tray) - when the page reloads, it should show the time generated by server and both browsers should show the same time.
"Confidence in the face of risk."

#3 corbin

corbin
  • Staff Alumni
  • Advanced Member
  • 8,129 posts

Posted 09 July 2006 - 08:12 PM

They match for me too...
Why doesn't anyone ever say hi, hey, or whad up world?

#4 Marijnn

Marijnn
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 09 July 2006 - 08:35 PM

OK, micah1701. I'm going to try to reload both browsers at the exact same time using Javascript. Maybe someone could try it on the mac as well, since I'm experiencing the same error in Safari and Firefox (Safari+45 sec = Firefox)...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users