We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I have this test code which started to fail with the latest release of pytz:
assert utc_str(datetime(2020, 1, 1, 0, 0, 0, 0, tzinfo=pytz.timezone("GMT"))) == "2020-01-01T00:00:00Z"
and fails with this error:
E AssertionError: assert '2019-12-31T23:42:00Z' == '2019-12-31T23:00:00Z'
The utc_str function boils down to:
utc_str
def utc_str(dt: datetime) -> str: return dt.astimezone(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
It works as expected in pytz 2024.1. Am I doing something wrong?
Thanks for clarification!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I have this test code which started to fail with the latest release of pytz:
and fails with this error:
The
utc_str
function boils down to:It works as expected in pytz 2024.1.
Am I doing something wrong?
Thanks for clarification!
The text was updated successfully, but these errors were encountered: