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?
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?
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:
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');
y is the year in two digits. You want h
edit: oops $this / $time typoe
$time = $page->getCollectionDatePublic('g:h a');
edit: oops $this / $time typoe
wow. operator error. haha! duh.
been there many times :)
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...