I have the master running Mysql 5.5.38 on Ubuntu 14.04 LTS. The timezone in the master is UTC+5:30. The slave is in AWS RDS which runs in UTC. The slave is primarily used for running for SQL queries by staff.
To maintain their sanity, I setup the timezone hack. This also applies to the replication user.
One of our innodb tables records scheduled appointments. The relevant parts of the table are below:
`startDateTime` timestamp NOT NULL DEFAULT '2000-01-01 12:00:00',
`endDateTime` datetime DEFAULT NULL,
`createdOn` timestamp NULL DEFAULT NULL,
I am seeing the following time on the master when querying the table:
- startDateTime - IST
- endDateTime - IST
- createdOn - IST
However on the slave:
- startDateTime - UTC
- endDateTime - IST
- createdOn - IST
Running SELECT NOW();
on either servers shows current time in UTC+5:30. The bin_log format on both master and slave is STATEMENT
How do I ensure that the replicated column startDateTime
is also in IST?
Update:
- RDS is a hosted mysql with no access to my.cnf. Futher time_zone variable is restricted and hard coded to UTC