mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
19 lines
317 B
Python
Executable File
19 lines
317 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import os
|
|
import sys
|
|
import datetime
|
|
|
|
def usage():
|
|
print("Usage:", os.path.basename(sys.argv[0]), "<seconds from epoch>")
|
|
|
|
if len(sys.argv) != 2:
|
|
usage()
|
|
sys.exit(1)
|
|
|
|
ts = sys.argv[1]
|
|
|
|
build_date = datetime.datetime.utcfromtimestamp(int(ts))
|
|
|
|
print(build_date.strftime("%Y-%m-%d"))
|