Bug fix on messages with timestamp being '0'

This commit is contained in:
KnugiHK
2025-05-05 16:13:17 +08:00
parent 3e3aeae7ad
commit 352be849a7

View File

@@ -27,7 +27,7 @@ class Timing:
Returns:
Optional[str]: Formatted timestamp string, or None if timestamp is None
"""
if timestamp:
if timestamp is not None:
timestamp = timestamp / 1000 if timestamp > 9999999999 else timestamp
return datetime.fromtimestamp(timestamp, TimeZone(self.timezone_offset)).strftime(format)
return None