-
Notifications
You must be signed in to change notification settings - Fork 80
Timezone missing from TIMESTAMP WITH TIME ZONE #274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This has been true from the very beginning of cx_Oracle. The primary reason for this is the fact that there are no C APIs for acquiring timezone information, which means that performance would be quite poor when fetching timestamps with time zone information. I've changed this to an enhancement request. I'll add some knob for those interested which will return timezone aware timestamps where applicable. |
@anthony-tuininga Hi Anthony, if put aside the perfomance issues, are there any workarounds to make |
The problem is when in the database we have values with different time zones, the returned result would be plain wrong and we can't adjust using some fixed value. Actual data (pk, ts)
Rows we get with the client:
|
When fetching such column, timezone is lost (since there is no performant API to set timezone), but there could be a driver option to return datetimes in UTC or local time, as a workaround. |
Is it an error or a hang or a crash?
Error: CURRENT_TIMESTAMP is returned as a timezone-unaware datetime
What error(s) or behavior you are seeing?
When running SELECT CURRENT_TIMESTAMP FROM DUAL on DBeaver I get a TIMESTAMP WITH TIME ZONE
When running the script at the bottom of this report I get:
(datetime.datetime(2023, 12, 20, 18, 33, 28, 585660),)
Which is not timezone-aware
Yes it does
The text was updated successfully, but these errors were encountered: