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:
parent
73e8b48003
commit
a06f51c49c
1 changed files with 7 additions and 0 deletions
7
voussoirkit/timetools.py
Normal file
7
voussoirkit/timetools.py
Normal 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()
|
Loading…
Reference in a new issue