Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Replace deprecated call todatetime.utcfromtimestamp #603

Closed
Assignees
bednar
Labels
bugSomething isn't working
Milestone
@cdce8p

Description

@cdce8p

Proposal:
Starting with Python 3.12datetime.utcfromtimestamp will be deprecated in favor of the timezone awaredatetime.fromtimestamp.https://docs.python.org/3.12/library/datetime.html#datetime.datetime.utcfromtimestamp
AFAICT this only effects one instance in the active (excluding examples) code base and the fix should be pretty simple

EPOCH=datetime.utcfromtimestamp(0).replace(tzinfo=timezone.utc)

-    EPOCH = datetime.utcfromtimestamp(0).replace(tzinfo=timezone.utc)+    EPOCH = datetime.fromtimestamp(0, tz=timezone.utc)

Note:datetime.utcnow() will also be deprecated in favor ofdatetime.now(tz=timezone.utc) but that's only used in examples or tests.https://docs.python.org/3.12/library/datetime.html#datetime.datetime.utcnow

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp