
1 2 3 4 5 6 7 8 9 10 |
# getting current timezone of database system SELECT @@global.time_zone, @@session.time_zone; # checking difference default timezone with UTC SELECT TIMEDIFF(NOW(), CONVERT_TZ(NOW(), @@session.time_zone, '+00:00')); # example code for converting timezone SELECT CONVERT_TZ(CURRENT_TIMESTAMP, '+09:00', '+00:00'); |