Showing wrong time while changing the format of date
I m changing the date format and it shows me wrong format
echo $punch_in_time;
// Prints 2013-09-09 11:40:00
echo $new_date = gmdate('D, M-d-Y h:i a',strtotime($punch_in_time));
// Prints Mon, Sep-09-2013 09:40 am (Notice the wrong time)
I also tried to set the time zone before displaying the time, but no
effect. I don't why this is happening, it must show my time as Mon,
Sep-09-2013 11:40 am instead of Mon, Sep-09-2013 09:40 am. please help
No comments:
Post a Comment