commit c78aac300a210a50ee49b2c2e030ef48ecfca3e3 from: Aleksey Ryndin date: Fri Apr 12 14:02:37 2024 UTC Add: print mtime UTC (always) commit - 2664db585c285ab6bba8939037026a1a6750f072 commit + c78aac300a210a50ee49b2c2e030ef48ecfca3e3 blob - 9cb42d32beefea159a24d3fbe6b4d04bbb153470 (mode 644) blob + 03bf5f585063bcc5af7475e4071178ba6558ae80 (mode 755) --- mtime_iso.py +++ mtime_iso.py @@ -1,9 +1,10 @@ +#!python3 import sys, os, datetime # python3 mtime_iso.py capsule/squat/reports/aarch64_exception_model.gmi if len(sys.argv) == 2: tz = datetime.datetime.now(datetime.timezone.utc).astimezone().tzinfo - print(datetime.datetime.fromtimestamp(os.stat(sys.argv[1]).st_mtime, tz=tz).isoformat()) + print(datetime.datetime.fromtimestamp(os.stat(sys.argv[1]).st_mtime, tz=tz).astimezone(datetime.timezone.utc).isoformat()) else: print(f"Usage: {sys.argv[0]} ", file=sys.stderr) sys.exit(1)