Add timetools.py.

I realize this is kind of stupid, but it means I never have to think
about the correct incantation again, and all my projects will
be on the same page with regards to correct utc timestamp.
This commit is contained in:
voussoir 2022-11-07 18:00:41 -08:00
parent 73e8b48003
commit a06f51c49c
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

7
voussoirkit/timetools.py Normal file
View file

@ -0,0 +1,7 @@
import datetime
def now():
return datetime.datetime.now(tz=datetime.timezone.utc)
def now_local():
return datetime.datetime.now().astimezone()