Blob


1 #!python3
2 import sys, os, datetime
4 # python3 mtime_iso.py capsule/squat/reports/aarch64_exception_model.gmi
5 if len(sys.argv) == 2:
6 tz = datetime.datetime.now(datetime.timezone.utc).astimezone().tzinfo
7 print(datetime.datetime.fromtimestamp(os.stat(sys.argv[1]).st_mtime, tz=tz).astimezone(datetime.timezone.utc).isoformat())
8 else:
9 print(f"Usage: {sys.argv[0]} <path>", file=sys.stderr)
10 sys.exit(1)