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
The output of strptime may be off by one week #9869
Comments
There is no ISO week 0. We seem to be confused between 0 and 1 based numbering. |
OK, I think part of the problem here is that the |
There was a small problem here caused by the |
If no weekday is specified for %W, use Monday, not Sunday as the default. This is less confusing, and since Python doesn't support it, we get to make the rules. fixes: duckdb#9869 fixes: duckdblabs/duckdb-internal#838
Missing file from commit.
What happens?
Hello,
I observed this behavior for the strptime/try_strptime functions:
Result:
I expected that the timestamp value be either 2009-12-28 or 2010-01-03 for strptime function, however, it returns one week after.
The result strftime on the otherhand is consistent with strftime c function (applying %G-W%V in c/python return 2009-W53). Could you please check the output for these functions?
To Reproduce
OS:
Ubuntu 22.04.1 LTS, Windows 10/11 all x64
DuckDB Version:
0.9.2, 0.9.1
DuckDB Client:
Python
Full Name:
Daniar Achakeev
Affiliation:
HMS Analytical Software GmbH
Have you tried this on the latest
main
branch?I have tested with a release build (and could not test with a main build)
Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
The text was updated successfully, but these errors were encountered: