Marijnn Posted July 9, 2006 Share Posted July 9, 2006 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.phpThanks in advance.. Quote Link to comment https://forums.phpfreaks.com/topic/14109-unix-timestamp-firefox-differs-from-ie/ Share on other sites More sharing options...
micah1701 Posted July 9, 2006 Share Posted July 9, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/14109-unix-timestamp-firefox-differs-from-ie/#findComment-55267 Share on other sites More sharing options...
corbin Posted July 9, 2006 Share Posted July 9, 2006 They match for me too... Quote Link to comment https://forums.phpfreaks.com/topic/14109-unix-timestamp-firefox-differs-from-ie/#findComment-55269 Share on other sites More sharing options...
Marijnn Posted July 9, 2006 Author Share Posted July 9, 2006 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)... Quote Link to comment https://forums.phpfreaks.com/topic/14109-unix-timestamp-firefox-differs-from-ie/#findComment-55283 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.