fix import
This commit is contained in:
parent
52710b844d
commit
5ed71bdcdd
@ -30,7 +30,6 @@ def parse_arguments():
|
||||
def format_timestamp(unix_timestamp):
|
||||
"""Convert UNIX timestamp to ISO format: YYYY:MM:DD HH:MM:SS"""
|
||||
try:
|
||||
#return datetime.utcfromtimestamp(unix_timestamp).strftime('%Y:%m:%d %H:%M:%S')
|
||||
return datetime.fromtimestamp(int(unix_timestamp), tz=timezone.utc).strftime('%Y:%m:%d %H:%M:%S')
|
||||
except Exception:
|
||||
print(f"Warning: Invalid timestamp {unix_timestamp}", file=sys.stderr)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user