Skip to content

Conversation

@anonymousx97
Copy link
Contributor

datetime.utcnow() is deprecated in py 3.12+ and it is recommended to use datetime.now(UTC)

it creates a timezone aware object and pyrogram's previous datetime object was timezone naive which resulted in:

TypeError: can't subtract offset-naive and offset-aware datetimes.

SpEcHiDe and others added 2 commits November 27, 2024 13:40
cavallium/faster-pyrogram@12f9207

Co-authored-by: Andrea Cavalli<cavallium@users.noreply.github.com>
datetime.utcnow() is deprecated in py 3.12+ and it is recommended to use datetime.now(UTC)

it creates a timezone aware object and pyrogram's previous datetime object was timezone naive which resulted in:

TypeError: can't subtract offset-naive and offset-aware datetimes.
@SpEcHiDe SpEcHiDe merged commit 0854967 into TelegramPlayground:L194 Nov 28, 2024
@SpEcHiDe SpEcHiDe mentioned this pull request Dec 27, 2024
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