Pagelist Displaying Wrong Timestamp

Permalink
I have my page-list set to display the date and time the article was posted, for example:

Mar 2, 2012 at 11:45am

However, what outputs for the time is always xx:12am/pm.

So even if the article goes in at 11:45am, it outs as 11:12am.

You can see the problem in action here:
http://knsiradio.com

Any idea why it would do this?

leinteractive
 
VPenkov replied on at Permalink Reply
VPenkov
Try the following:
1) Open your .htaccess file.
2) Set the top line like so:
SetEnv TZ Europe/Berlin

Of course, replace the Europe/Belin part with your website's location.
Here's a list:http://www.php.net/manual/en/timezones.php...
leinteractive replied on at Permalink Reply
leinteractive
Didn't seem to do the trick.

Why would that matter anyways?

In case it matters, this is how I'm getting the data to output in my template:

$date = $page->getCollectionDatePublic('M j, Y');
$time = $page->getCollectionDatePublic('g:y a');
mkly replied on at Permalink Reply
mkly
y is the year in two digits. You want h
$time = $page->getCollectionDatePublic('g:h a');


edit: oops $this / $time typoe
leinteractive replied on at Permalink Reply
leinteractive
wow. operator error. haha! duh.
mkly replied on at Permalink Reply
mkly
been there many times :)