Changing set_timezone does not always take effect
Posted
by
LearneR
on Stack Overflow
See other posts from Stack Overflow
or by LearneR
Published on 2012-12-13T10:44:51Z
Indexed on
2012/12/13
11:04 UTC
Read the original article
Hit count: 171
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?
© Stack Overflow or respective owner