Reputation: 777
TO_DATE in Oracle is wrongly converting the following statement:
SELECT
to_date('20200108 000000', 'YYYYMMDD HH24MISS') D1,
to_date('20200107 000000', 'YYYYMMDD HH24MISS') D2
FROM dual;
Both lines are exactly the same except for the 8 instead of 7. It doesn't make sense (for me), Oracle converting Tuesday correctly and not Wednesday. There should not be any DST...
Upvotes: 1
Views: 746
Reputation: 777
It was solved.
The clock on my client's server was configured to use DST and got this error because we were supposed to have DST in Brazil in 2020, but we didn't.
I believe it happened because it's an old Windows Server and might have not updated the DST tables.
Updating the clock on the server solved the issue.
The error itself I believe was generated by the application's driver, and not by Oracle.
Upvotes: 0
Reputation: 4129
It is the tool you're using, the SQL Developer. It overrides the DB NLS settings with their own.
Go to Tools -> Preferences, then Database -> NLS and check the settings
Upvotes: 1