CBR Posted February 1, 2007 Share Posted February 1, 2007 I am using the below to generate the current date and time, and all is well, except the time is several minutes off, and when I refresh it still keeps the same time it generated before. Is there another way to generate a mroe real-time date/time? $aftime = date("Y-m-d h:m:s"); Link to comment https://forums.phpfreaks.com/topic/36655-date-not-returning-the-correct-time/ Share on other sites More sharing options...
snowrhythm Posted February 1, 2007 Share Posted February 1, 2007 if you're running that script on a server that isn't on your PC, then it's going to give back the time that the server is set to...which of course might differ from the time on your computer. Link to comment https://forums.phpfreaks.com/topic/36655-date-not-returning-the-correct-time/#findComment-174742 Share on other sites More sharing options...
CBR Posted February 2, 2007 Author Share Posted February 2, 2007 The time on the server now is 9:02 AM and the time it populated is 08:32:56. And if I close the browser and refresh, same story. Shows the same time. I clear my cache, and load the page and it echoes that same time. Link to comment https://forums.phpfreaks.com/topic/36655-date-not-returning-the-correct-time/#findComment-175441 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.