Re: Error when setting useTimezone=true
Posted by: Mark Matthews
Date: August 22, 2005 09:11PM

Paul Darling wrote:
> I've tried populating the mysql time_zone* tables,
> and setting GLOBAL time_zone =
> 'America/Los_Angeles', but now see this error:-
>
> java.sql.SQLException: Can't map timezone
> 'America/Los_Angeles' to canonical timezone.
> at
> com.mysql.jdbc.Connection.configureTimezone(Connec
> tion.java:3121)
> at
> com.mysql.jdbc.Connection.initializePropsFromServe
> r(Connection.java:3252)
> at
> com.mysql.jdbc.Connection.createNewIO(Connection.j
> ava:1780)
> at
> com.mysql.jdbc.Connection.<init>(Connection.
> java:430)
> at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonReg
> isteringDriver.java:268)
>
> Any idea what type of time zone values needs to be
> used. When the server was using PDT, the JDBC
> error message gave 'America/Los_Angeles' as an
> example of a time zone to use instead.
>
> Paul


Paul,

The JDBC driver's not setup to do this from what I can tell (since the timezone support pre-dates MySQL-4.1, where the timezone tables stuff was added). The only thing I can tell you is that _today_ you need to specify it with "serverTimezone=..." on the client side. I'll file this as a bug in the morning though, so it will get fixed in the next applicable Connector/J release.

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote


Subject
Written By
Posted
Re: Error when setting useTimezone=true
August 22, 2005 09:11PM


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

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.