Change time zone for now : Time zone « Date Time « SQL / MySQL






Change time zone for now

    
mysql>
mysql>
mysql> SELECT NOW();
+---------------------+
| NOW()               |
+---------------------+
| 2011-10-03 10:22:37 |
+---------------------+
1 row in set (0.00 sec)

mysql>
mysql> SET time_zone='-8:00';
Query OK, 0 rows affected (0.00 sec)

mysql>
mysql> SELECT NOW();
+---------------------+
| NOW()               |
+---------------------+
| 2011-10-03 10:22:37 |
+---------------------+
1 row in set (0.00 sec)

mysql>

   
    
    
    
  








Related examples in the same category

1.Check the time-zone
2.Time Zone Adjustments
3.Get the value of the TIME_ZONE system variable.
4.Change time zone
5.Check the time zone