August 14, 2012 by harshalvaidya
We can convert the time zones required by MySQL without changing the server timezone where it is not possible on a live production server.But its possible to make around it.
The following queries shows :-
mysql> SELECT NOW();
It will display date and time by MySQL
mysql> SELECT DATE_ADD(NOW(), INTERVAL 18 HOUR); Or SELECT DATE_SUB(NOW(), INTERVAL 18 HOUR);
This will modify the time by adding and/or subtracting an 18 hrs of interval .