-
Notifications
You must be signed in to change notification settings - Fork 216
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
Timestamp with no time zone id is returning a different value #133
Comments
This would make sense if the local time zone is US-Pacific on the machine you run this on, as it would assume a timestamp without timezone is expressed in 'local time'... (and IMHO is a reason why timestamps should always have a timezone to avoid ambiguity). |
Hi @nielm, thanks for answering! |
Looking at the code, it initializes a default time zone to America/Los_Angeles (US-Pacific) (which is very normal for a Google product!) zetasql/zetasql/reference_impl/evaluation.cc Line 126 in 177d495
It is possible to set the default timezone on the analyzer using the AnalyzerOptions zetasql/zetasql/public/analyzer_options.h Line 469 in 177d495
|
I see. I'll try to use it. Thanks a lot @nielm ! |
Hi!
I'm trying to analyze a simple timestamp value (i.e
SELECT TIMESTAMP '2019-02-11 20:26:53.218';
) with no time zone id by using the functionAnalyzeNextStatement
. After the analysis, the output has changed the timestamp value to2019-02-12 04:26:53.218+00
. Shouldn't it be2019-02-11 20:26:53.218+00
instead?Is there any way to parameterize the time zone id without passing it within the timestamp?
Thanks in advance!
The text was updated successfully, but these errors were encountered: