Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

function "xx hours ago" is way wrong...


Reply


335 Views

Avatar
Futureweb

Community Member, 233 Posts

5 December 2011 at 8:38am

Hi there,

I have a UK based (GMT) server, which I'm using for a NZ site. I've adjusted the time of the server using .htaccess.
(php_value date.timezone Pacific/Auckland)

Looking at records in the database, all the times saved are correct in NZ time, but when I use the 'ago' function in the CMS, it says things were created 16 hours ago, when they were in fact created a few minutes ago.

I don't understand where the 16 hour difference is coming from, or how to correct it

cheers