Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-91928: Adddatetime.UTC alias fordatetime.timezone.utc#91973
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
8 commits Select commitHold shift + click to select a range
65fbe0d feat(datetime): Add `datetime.UTC` alias for `datetime.timezone.utc`
Kab1rce04985 docs: Add NEWS entry for #91973
Kab1r28f228b docs: add contribution acknowledgement
Kab1rcefda33 docs(datetime): clarify `UTC` timezone singleton
Kab1r1e8257d docs(datetime): add versionadded to `datetime.UTC`
Kab1r7335f0a test(datetime): add test for `datetime.UTC` alias
Kab1r185c7ac fix(datetime): move `datetime.UTC` definition to end to ensure that i…
Kab1r9542f54 Clean up nits
pganssleFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
PrevPrevious commit
Clean up nits
1. Add UTC definition into C implementation as well (just for consistency, there's no particular reason not to simply assign the alias in the Python code later).2. Move `..versionadded` tag into the right place
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit9542f545e08f4f0d208af9d4583988c56c543827
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -84,11 +84,12 @@ The :mod:`datetime` module exports the following constants: | ||
| The largest year number allowed in a :class:`date` or :class:`.datetime` object. | ||
| :const:`MAXYEAR` is ``9999``. | ||
| .. attribute:: UTC | ||
pganssle marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| Alias for the UTC timezone singleton :attr:`datetime.timezone.utc`. | ||
Kab1r marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| .. versionadded:: 3.11 | ||
| Available Types | ||
| --------------- | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.