Is there any timezone attached (like metadata) with every datetime field values in MySQL? Or every dates are independent of timezone?
Asked
Active
Viewed 43 times
0
-
1No, there is no time zone stored in the DB. – juergen d Jun 06 '14 at 11:22
1 Answers
2
Is there any timezone attached (like metadata) with every datetime field values in MySQL?
No, there is no timezone stored in DB with every date (like metadata). MySQL, by default, takes the timezone of the server for all stored dates.
To find out what it is try to run this in the shell
mysql> SELECT @@global.time_zone, @@session.time_zone;
Now as you can see there are always these 2 timezones for the serve
- Global(for all mysql connections)
- Session - local to the connection
Go through this Stackoverflow question to read more about this. Also this question to read how to change/set it

Community
- 1
- 1

Sandeep Rajoria
- 1,243
- 8
- 14