rename dtk -> dcd
This commit is contained in:
parent
e7a35d23e5
commit
139381e7fc
7 changed files with 56 additions and 26 deletions
16
dcd/dt.py
Normal file
16
dcd/dt.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
#! /usr/bin/env python3
|
||||
# encoding: utf-8
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
|
||||
import datetime
|
||||
import pytz
|
||||
|
||||
def now(tz_name="UTC"):
|
||||
t = datetime.datetime.now()
|
||||
tz = pytz.timezone(tz_name)
|
||||
|
||||
return tz.localize(t)
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue