I am trying to a get a unix_timestamp after doing a date_add to my database field but it still giving me the unix_timestamp of the original value not after the date_add.
Here is my query.
SELECT data1.speed,UNIX_TIMESTAMP(Date_Add(data1.dateTimer , Interval '+08:00' hour_minute)) as dateTimer
For example the dateTimer value is 2015-10-02 15:27:53 after date_add is 2015-10-02 23:27:53 but the unix_timestamp is giving me 1443799673 which refers to 2015-10-02 15:27:53. I even tried the CONVERT_TZ function its still the same.
UNIX_TIMESTAMP(Date_Add(data1.dateTimer , Interval '+08:00' hour_minute))andUNIX_TIMESTAMP(data1.dateTimer)? They should be different.UNIX_TIMESTAMPof the date value, and add8 * 60 * 60 = 28800seconds to the result, if it is really a bug?DateTimeobject, and convert the timezone automatically by setting the default timezone and then changing the timezone of the object (see php.net/manual/en/class.datetimezone.php)