Jump to content

Archived

This topic is now archived and is closed to further replies.

Marijnn

Unix timestamp Firefox differs from IE

Recommended Posts

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..

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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)...

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.