Mysql Default Timezone

War


Mysql Default Timezone

Using MySQL NOW function to provide the default value for a column. You can use the NOW function to provide a default value for a DATETIME or TIMESTAMP column. When you omit the date or time value in the INSERT statement, MySQL inserts the current date and time into the column whose default value is NOW. How do I set a timestamp column whose default value is the current UTC time? MySQL uses UTCTIMESTAMP function for UTC timestamp: mysql SELECT UTCTIMESTAMP; +-+.

Posted by: Ratnakar Koli
Date: April 23, 2009 07:29AM

Hi!
In one particular instance where my server is setup out of India, in my website I have to display the current time according to the India time zone, i.e. Asia/Calcutta.
I've tried using the following:
1. added the following to my.ini
[mysqld_safe]
timezone = Asia/Calcutta
2. In mysql console the following command was executed:
set time_zone = 'Asia/Calcutta'
and
set time_zone = '+5:30'
but I could not get the desired results.
How can I change mysql default system time zone to the one I desire?
Thank you,
Ratnakar Koli

Mysql Default Timezone Utc

Mysql default timezone windows
Options:Reply•Quote

Written By

Sorry, you can't reply to this topic. It has been closed.

Mysql Default Timezone My.cnf

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.