diff --git a/pyrogram/utils.py b/pyrogram/utils.py index e5541916f..52a62d8aa 100644 --- a/pyrogram/utils.py +++ b/pyrogram/utils.py @@ -454,7 +454,7 @@ def zero_datetime() -> datetime: def timestamp_to_datetime(ts: Optional[int]) -> Optional[datetime]: - return datetime.fromtimestamp(ts) if ts else None + return datetime.fromtimestamp(ts).replace(tzinfo=timezone.utc) if ts else None def datetime_to_timestamp(dt: Optional[datetime]) -> Optional[int]: