Timestamps with Timezones in Database Tables? | Matthew Bellew | 2012-11-09 08:58 |
Status: Closed | ||
This is a tricky area. * Java is timezone aware so in dates in code can easily be translated to another timezone for display for instance. * databases typically store datetimes without timezones So we simply translate datetimes to the server's timezone before writing to the database. This all works pretty consistently, and works for most uses. If you connect an external database with a column where the timezone is remembered with the column I expect we should display the "correct" time. However, since we don't carry the 'preferred' timezone around it will be translated into the server's timezone when formatted. It would be possible in the future to switch away from java.util.Date to java.util.Calendar which does remember a timezone, but it would require a bit of testing. |
||