Bug #7776 Does not set cleint's side time zone for a session
Submitted: 10 Jan 2005 15:50 Modified: 13 Feb 2005 20:10
Reporter: [ name withheld ] Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:4.1.8 OS:Windows (Windows)
Assigned to: CPU Architecture:Any

[10 Jan 2005 15:50] [ name withheld ]
Description:
4.1.3 and higher supports time zone. In order to return correct values for now() function and time fields session time zone has to be set to match client's time zone.
Is this a bug or default behaviour?

How to repeat:
Make sure the server has default-server-timezone set to time zone different from a client's system time.

Create table:

CREATE TABLE `test` (
`test` varchar(100) default NULL,
`time_stamp` timestamp);

Link table through ODBC to MS Access, for example. Add value to test field. time_stamp will show time in server's time zone.
[14 Jan 2005 14:51] Aleksey Kishkin
Hi!
did you try from client command 
SET TIME_ZONE='your_client_timezome'
as in  http://dev.mysql.com/doc/mysql/en/Time_zone_support.html  ?
[14 Jan 2005 15:12] [ name withheld ]
I tried set time_zone=<TZ> from the command line client and VB. It works without a glitch.
I am talking about linked tables, when you use ODBC to link MySQL tables to MS Access. Looks like there is no mechanism inside ODBC driver for issuing the command "set time_zone" automatically for new sessions for linked tables. I guess I will have to query client's time and build the set statement into a connection string.
[13 Feb 2005 20:10] Aleksey Kishkin
I think it's a feature request.
[14 Feb 2005 17:05] [ name withheld ]
It would be greate feature! Currently I have VB code to add time zone set up statement for each linked table, and the statement started working only with  latest development version of ODBC driver. It didn't work with 3.51.10, and I didn't use 3.51.11 because of connection problem.
Thanks!