OK I have a MySQL DB in UTC timezone, I don't want to change that (it is a AWS RDS). I am running all queries through php_mysqli I am using the following after connection to set timezone:
SET time_zone = "-05:00"
I have a table test with 2 fields:
date_add => DATETIME
date_upd => TIMESTAMP
The MySQL NOW() and CURRENT_TIMESTAMP match and are in right timezone. Confirmed my running:
SELECT NOW()
SELECT CURRENT_TIMESTAMP
When I run the following:
INSERT INTO `test` SET `date_add`=NOW()
then
SELECT * FROM `test`
I get matching date_add and date_upd with correct time zone
However when I look at the raw table in CLI or phpMyAdmin the results are different, like in different timezones?
+---------------------+---------------------+
| date_add | date_upd |
+---------------------+---------------------+
| 2013-06-07 15:57:09 | 2013-06-07 20:57:09 |
+---------------------+---------------------+
Not sure if the 2 fields are just set to differnt time zones are what is going on any help with this would be greatly appreciated... thx