-
Notifications
You must be signed in to change notification settings - Fork 27
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
Unsupported query: timezone() doesn't support UTC offsets #97
Comments
I think this might be resolved by cockroachdb/cockroach#41776 which has an open PR out. |
Fixed on cockroachdb master. |
Actually, I still see this error with the latest snapshot of master, v20.1.0-alpha20191216. |
@otan to take a look |
To double check, it works on master but not in the Alpha? What commands are you running - - the same as the one posted? |
Neither master nor alpha works. I thought it was working previously but I may have made a mistake when testing. Yes, the sample query from this issue description is what fails. |
okay, PR is up to fix it! |
Hi @otan, it looks like there may be a bug in this fix. For example, I see this test case in your commit:
however, on PostgreSQL, the same query gives: Similarly, in Django's test suite, CockroachDB is giving incorrect values when |
hey tim - yeah I realised this recently and have cockroachdb/cockroach#44099 merging shortly. Sorry about that - I guess I will never master time :P |
also it does sound like in your case, postgres defaults to your local time zone and cockroach uses UTC, which should explain the 11 hour difference between results (5 for timezone, 3+3 for UTC-3 being flipped the wrong way around) |
I confirmed the test is passing now. Thanks! |
The
timezone()
function (AT TIME ZONE
) doesn't seem to accept UTC offsets like PostgreSQL does:Sample query:
Django test failure:
The text was updated successfully, but these errors were encountered: