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; +-+.
Date: April 23, 2009 07:29AM
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
timezone = Asia/Calcutta
2. In mysql console the following command was executed:
set time_zone = 'Asia/Calcutta'
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?
Mysql Default Timezone Utc
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.