Datetimes after a server timezone move
Posted by: Mark Lichtenberg
Date: December 28, 2015 02:39PM

We have a legacy database containing many DATETIME columns, and is configured in the PST timezone. We intend to migrate this database to UTC (Amazon RDS).

Using the 5.1.38 connector, a test database in UTC, and the default useLegacyDatetimeCode=true, datetime fields are fetched exactly as they had been when the database was PST. When useLegacyDatetimeCode=false, the datetimes are shifted by the 8 hour offset. I've reviewed the code and I understand why this is happening - the datetimes inserted/fetched are formatted using the server's timezone instead of the connection's timezone.

I have two questions concerning this -
1) is there connection property that would allow us to use useLegacyDatetimeCode=false but still use the local connection timezone for inserts/updates/selects?
2) what is the risk of continuing to use and rely on useLegacyDatetimeCode=true? I understand the default has been changed to false in the trunk, so how long will this option be maintained in the future?

Options: ReplyQuote

Written By
Datetimes after a server timezone move
December 28, 2015 02:39PM

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.