Google+

MySQL TimeZone

2

August 14, 2012 by harshalvaidya

MySQL Timezones

 

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

2012-08-15 12:04:12

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 .

—————————-

Advertisements

2 thoughts on “MySQL TimeZone

  1. I like what you guys are up also. Such clever work and reporting! Keep up the superb works guys Iˇ¦ve incorporated you guys to my blogroll. I think it’ll improve the value of my website 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog Stats

  • 773 hits

stat

var infolink_pid = 1084591; var infolink_wsid = 0;
%d bloggers like this: