I have two table
table-1
id date-time
-----------------------
1 2012-12-13 15:20:13
table-2
id date-time
-----------------------
1 2012-12-13 15:20:13
Now i am selecting the record with mysql set_timezone function
Case-1
SET time_zone='+00:00';
SELECT `date-time` FROM `table-1`; // 2012-12-13 09:50:13
Case-2
SET time_zone='+00:00';
SELECT `date-time` FROM `table-2`; // 2012-12-13 15:20:13 ---Not converting to specified timezone
In case-1 it’s giving converted date-time, but not in Case-2. What would be the issue?
table-1
table-2
So the issue was with datatype. Now i changed the
datetimeintotimestampin table-2. Issue solved.