$time->format() displays wrong date
-
I believe its due to timezone issue.
The server is set to UTC, and software local timezone is set to Asia/Singapore (UTC +8).
After the line$time = $this->_registry->get( 'date.time' );
inwidget.php
I trie$time->format()
to get the current time and got a time that is -8 of local time.
Is there anyway to get it to return the local time instead of server time?Have also tried to set date manually with timezone,
$time =$time->set_date_time(‘now’, ‘Asia/Singapore’);
$time->format()but its still -8 behind local time.
https://www.ads-software.com/plugins/all-in-one-event-calendar/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘$time->format() displays wrong date’ is closed to new replies.