python-minari-date/minari_date/__main__.py
2021-03-19 15:42:41 +01:00

16 lines
273 B
Python

from datetime import datetime
import sys
from dateutil.parser import parse
from . import MinariDateTime
if len(sys.argv) > 1:
timestamp = parse(sys.argv[1]).replace(tzinfo=None)
else:
timestamp = datetime.utcnow()
dt = MinariDateTime(timestamp)
print(str(dt))