Skip to content

support: use a keyword argument for datetime.fromtimestamp - #1146

Merged
steadytao merged 1 commit into
RsyncProject:masterfrom
elboulangero:fromtimestamp
Nov 4, 2026
Merged

steadytao merged 1 commit into
RsyncProject:masterfrom
elboulangero:fromtimestamp

Conversation

@elboulangero

Copy link
Copy Markdown
Contributor

This is how it's documented, cf.

Quoting from the doc:

the recommended way to create an object representing a specific
timestamp in UTC is by calling datetime.fromtimestamp(timestamp,
tz=timezone.utc).

This is just a nit, it doesn't fix anything, it's just better style IMO.

This is how it's documented, cf.
* https://docs.python.org/3/library/datetime.html#datetime.datetime.fromtimestamp
* https://docs.python.org/3/library/datetime.html#datetime.datetime.utcfromtimestamp

Quoting from the doc:

> the recommended way to create an object representing a specific
> timestamp in UTC is by calling datetime.fromtimestamp(timestamp,
> tz=timezone.utc).

This is just a nit, it doesn't _fix_ anything, it's just better style
IMO.
@steadytao steadytao changed the title support: Use a kwarg for datetime.fromtimestamp support: use a keyword argument for datetime.fromtimestamp Nov 4, 2026

@steadytao steadytao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nonetheless its good to merge.

@steadytao
steadytao merged commit a6b31ad into RsyncProject:master Nov 4, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants