Hi all. I'm selecting a PostgreSQL timestamp field, converting it to a unix timestamp, and then formatting it using the date() function. Here's the code:
echo $d->fields['last_mod']." - ".date("d/m/y g:m:s A",strtotime($d->fields['last_mod']));
Here's a url with the output:
http://waddington.unbc.ca/date_test.php
The problem:
It all formats properly except the minutes. For some reason the minutes are different when formatted in PHP on the right than they are in the PostgreSQL timestamp on the left.
This is the result:
timestamp php formatted date
2002-10-13 18:20:15 - 13/10/02 6:10:15 PM
2002-10-13 18:22:24 - 13/10/02 6:10:24 PM
As you can see in the php formatted date the minutes for both records show up as 10, when by the timestamps you can see they are clearly 20 and 22, respectively.
Does anyone have any idea what could possibly be causing this? I'm completely stumped.
Thanks in advance,
Pablo