Martin Dubuc wrote:
> I have a table that contains a datetime column
> named StartTime.
>
> In my Java source, I perform the following
> operation:
>
> startTime = rs.getTimestamp("StartTime");
>
> What I have noticed is that getTimestamp performs
> some sort of timezone conversion. For instance, if
> the value of StartTime is "2005-07-04 01:00:00",
> when I print the result of getTimestamp, I see
> "2005-07-04 05:00:00". I would like to get the raw
> value from the database. How is it possible?
>
> Martin
Martin,
Do you have "useTimezone=true" in your JDBC URL? Timezone conversion won't happen if you don't have this configuration value set.
How do you print out the timezone value (some of the date formatting routines in Java will do timezone conversion).
-Mark
Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html