strtotime is giving me the wrong time zone of (+0730) vs the correct timezone of (+0800).
I have my date time stored on MySQL in a datetime field. The data that is stored in that field is
2016-08-02 09:30:00
I am getting my PHP scripts to send a JSON output of that value to a Javascript.
Console.log of PHP's output (without strtotime) {date: "2016-08-02 09:30:00", timezone_type: 2, timezone: "SGT"}
Console.log of PHP's strtotome output 1470103200 which works out to Tue Aug 02 2016 10:00:00 GMT+0800 (SGT), and on some of the HTML outputs, i'm getting Tue Aug 02 2016 09:30:00 GMT+0730
My server's date +%Z output is SGT.
MySQL's SELECT @@global.time_zone, @@session.time_zone; is SYSTEM
Any idea why PHP's strtotime is giving me time in the wrong timezone?