Buy Now
Sign in

{date:} returns date in wrong timezone

healyhatman , April 09 at 23:37
Answered
healyhatman
It's currently 9:32 AM, 10/Apr/2018 here in GMT+11 Australia. So 2018-04-10 09:34:00
{date:Y-m-d H:m:s} is giving me 2018-04-09 23:04:23 which is... what, UTC -0.5 ?
Either this is a bug, or there's a format string I should be adding to {date:} to get the time in the right format.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
healyhatman
After digging through the code I found it.
{date/timezone:php_format$parameter}
Format strings are built using the date function parameters, see http://php.net/manual/en/function.date.php
So for example if I want the time in 12-hour format and date in dd-mm-yyyy 10 days and 3 hours from now in Australian Eastern Standard Time, with the timezone displayed and the ante/post mediridan (am/pm):
{date/AEST:h:i:s a d-m-Y  e$+ 10 days 3 hours}
Which currently gives me
02:04:36 pm 23-04-2018 Australia/Sydney
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman