]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-91928: Add `datetime.UTC` alias for `datetime.timezone.utc` (GH-91973)
authorKabir Kwatra <kabir@kwatra.me>
Tue, 3 May 2022 22:14:25 +0000 (15:14 -0700)
committerGitHub <noreply@github.com>
Tue, 3 May 2022 22:14:25 +0000 (15:14 -0700)
commit48c6165c28dfb40eafd2fa6de9bebd14fbc7c95c
tree877ad0238cb76142bbbc27318b7ed71fd72c56cc
parentee2205b208389611e8a278ac1bc74b34f4994fd2
gh-91928: Add `datetime.UTC` alias for `datetime.timezone.utc` (GH-91973)

### fixes #91928

`UTC` is now module attribute aliased to `datetime.timezone.utc`.
You can now do the following:
```python
from datetime import UTC
```
Doc/library/datetime.rst
Lib/datetime.py
Lib/test/datetimetester.py
Misc/ACKS
Misc/NEWS.d/next/Library/2022-04-26-18-02-44.gh-issue-91928.V0YveU.rst [new file with mode: 0644]
Modules/_datetimemodule.c