php date() stuck
Posted
by WAC0020
on Stack Overflow
See other posts from Stack Overflow
or by WAC0020
Published on 2010-06-15T15:38:24Z
Indexed on
2010/06/15
15:42 UTC
Read the original article
Hit count: 214
I am getting the date from my mysql database and that date is correct but when I use the date() function the minute part is stuck a 6 minutes.
My mysql is returning 2010-06-15 09:59:18
Then in php I use this code:
date('M d,Y H:m A',strtotime($row[4]))
** $row[4] is from my while loop **
When I echo this out I get: Jun 15,2010 9:06 AM
I also have tried converting it to unix timestamp in my sql query, does the same thing.
I noticed that the hours work and the seconds work but the minutes are stuck at 6.
Does anyone have any ideas on what is going on?
© Stack Overflow or respective owner