I have been looking at the derby documentation for TIMESTAMP, and it's pretty confusing when it comet to try to figure what will happen if I move a database onto a machine in a different timezone.

http://db.apache.org/derby/papers/JDBCImplementation.html#Derby+SQL+TIMESTAMP

----------
Derby’s SQL TIMESTAMP type represents a time of day in the form yyyy-mm-dd hh:mm:ss.fffffffff (nanosecond granularity) with no associated time zone information.

java.sql.Timestamp

A JDBC Timestamp (java.sql.Timestamp) by definition represents a point in time, with nanosecond resolution, in a given time zone.
----------

So what does "no associated timezone information" mean? Does Derby normalize all timestamps to UTC, or does it just throw away the timezone information altogether? If it is the second, that makes it impossible to move databases across timezones without having to recalculate any timestamps it uses.

Ideally I'd like all times to be stored by Derby in UTC, but I can't set the JVM timezone to UTC as the Derby database is running inside Tomcat, and such a change would affect *all* the webapps running in the web container.

--
Alan Burlison
--

Reply via email to