Created
April 12, 2016 12:59
-
-
Save jgdoncel/5549c525daef5fd7e077653d019e68b2 to your computer and use it in GitHub Desktop.
MYSQL SET UTC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> SELECT CURRENT_TIMESTAMP(); | |
+---------------------+ | |
| CURRENT_TIMESTAMP() | | |
+---------------------+ | |
| 2016-04-12 14:31:59 | | |
+---------------------+ | |
1 row in set | |
mysql> SELECT @@global.time_zone, @@session.time_zone; | |
+--------------------+---------------------+ | |
| @@global.time_zone | @@session.time_zone | | |
+--------------------+---------------------+ | |
| SYSTEM | SYSTEM | | |
+--------------------+---------------------+ | |
1 row in set | |
mysql> SET @@session.time_zone='+00:00'; | |
Query OK, 0 rows affected | |
mysql> SELECT @@global.time_zone, @@session.time_zone; | |
+--------------------+---------------------+ | |
| @@global.time_zone | @@session.time_zone | | |
+--------------------+---------------------+ | |
| SYSTEM | +00:00 | | |
+--------------------+---------------------+ | |
1 row in set | |
mysql> SELECT CURRENT_TIMESTAMP(); | |
+---------------------+ | |
| CURRENT_TIMESTAMP() | | |
+---------------------+ | |
| 2016-04-12 12:32:35 | | |
+---------------------+ | |
1 row in set | |
mysql> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment