hi MySQL automatically converts a date or time type value to a number (numeric context) & viceversa.
When the server starts, it attempts to determine the time zone of the host machine and uses it to set the system_time_zone system variable. The value does not change thereafter. The global time_zone system variable indicates the time zone the server currently is operating in. The initial value for time_zone is 'SYSTEM', which indicates that the server time zone is the same as the system time zone. Try SELECT @@global.time_zone, @@session.time_zone; SET time_zone = timezone; timezone values can be given as strings indicating an offset from UTC, such as '+10:00' or '-6:00'. If you have a problem with SELECT NOW() returning values in UTC and not your local time, you have to tell the server your current time zone. This should be done for the environment in which the server runs. Thanks ViSolve DB Team ----- Original Message ----- From: "Chris" <[EMAIL PROTECTED]> To: <mysql@lists.mysql.com> Sent: Wednesday, August 23, 2006 8:11 AM Subject: dates in mysql > Hi all, > > Does anyone know how mysql stores dates? > > I'm wondering whether it converts it back to UTC before storing it (and > back to the client timezone setting when you select) or whether it > leaves it "as is" with the timezone information. > > So to change to a different timezone I'd have to convert it back to UTC > and so on manually.. > > I've looked through the manual a few times but can't find an answer > either way :( > > Thanks, > Chris. > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] >