jmajeremy Posted November 30, 2009 Share Posted November 30, 2009 I run a LAMP (Ubuntu Server, Apache2.2, MySQL5.2, PHP5). Strangely enough, date() has decided to stop keeping track of minutes on my server! A line on my website greets users like this: The time is <?php echo date("H:m:s")." UTC".date("O"); ?> For some reason, the minutes are frozen at "11". The hours and seconds seem to be displaying correctly, but the minutes never change. So at 8:* PM, the output will always be "20:11:* UTC-0500". Any suggestions? My server's actual clock is keeping time perfectly, and I've tried restarting apache to no avail! Link to comment https://forums.phpfreaks.com/topic/183367-peculiar-bug-with-date-function/ Share on other sites More sharing options...
Alex Posted November 30, 2009 Share Posted November 30, 2009 m is for the month. We're currently in November, the 11th month so that's why it's displaying that. Instead change m to i Link to comment https://forums.phpfreaks.com/topic/183367-peculiar-bug-with-date-function/#findComment-967895 Share on other sites More sharing options...
jmajeremy Posted November 30, 2009 Author Share Posted November 30, 2009 m is for the month. We're currently in November, the 11th month so that's why it's displaying that. Instead change m to i LOL! I must have really been tired when I wrote that. Thank-you for pointing it out! Link to comment https://forums.phpfreaks.com/topic/183367-peculiar-bug-with-date-function/#findComment-967910 Share on other sites More sharing options...
Alex Posted November 30, 2009 Share Posted November 30, 2009 By the way, there's a feature to mark a topic as solved. To do so there's a button at the bottom left. Link to comment https://forums.phpfreaks.com/topic/183367-peculiar-bug-with-date-function/#findComment-967916 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.