-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Date are always UTC #24
Comments
Um... I have done the same test with entreprise tool and it's not good too! +01:00 is my current time zone go-ora tests: So, maybe this is not very important... what do you think ? |
I make changes that add timezone information to the datetime in decodedate function test and feedback |
current_date return time only and default time zone is UTC |
I have tested following query with SqlDeveloper: SELECT to_char(CURRENT_DATE, 'YYYY-MM-DD HH24:MI:SS') "CURRENT_DATE" , to_char(CURRENT_TIMESTAMP, 'YYYY-MM-DD HH24:MI:SS TZR') "CURRENT_TIMESTAMP", to_char(SYSDATE, 'YYYY-MM-DD HH24:MI:SS') "SYSDATE", to_char(SYSTIMESTAMP, 'YYYY-MM-DD HH24:MI:SS TZR') "SYSTIMESTAMP" FROM DUAL
And now with go-ora c9e66ca
So, datetime values are now correct. However, is it possible to add timezone information where it is expected: And I think there are less popular timedate types which are carrying TZ. |
this query
same like sql developer |
My fault! TO_CHAR gives a VARCHAR... Indeed I get this:
... which looks good. I have checked the application's database I'm taking care of. Most of dates are DATE... and the application mis handle time zones... So, I guess this now good enough. |
I have found that datetime are returned in UTC regardless local time, session settings, database settings.
Assuming my sever is UTC, my session EST, and the local time EST
At 2020-11-16 19:58:10 local time , using go-ora to select CURRENT_DATE from dual returns 2020-11-16 19:58:10 +0000 UTC
The current code sets the the location to UTC in all circumstances:
go-ora/converters/type_conversion.go
Lines 45 to 46 in ae061e9
I propose to investigate on this, and propose a PR.
++
The text was updated successfully, but these errors were encountered: