-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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_time_this_year provides non existent date #2027
Comments
Hi, I am interested in taking this issue on. Can this be assigned to me? |
No need to formally assign the issue. Feel free to submit a Pull Request! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage of
date_time_this_year
can sometimes choose a date that does not exist. It throws an exceptionpytz.exceptions.NonExistentTimeError: 2024-03-10 02:11:40.454602
This is because this is the time when clocks changed for daylight savings. Clocks rolled back at 2AM, so no times in that hour exist.
Steps to reproduce
date_time_this_year
repeatedly, eventually it will pick a bad date.Expected behavior
The library should not provide datetimes that do not exist.
Actual behavior
The library provided a datetime that does not exist
The text was updated successfully, but these errors were encountered: