Add .items() to Config
This commit is contained in:
parent
af0881b823
commit
e7a35d23e5
5 changed files with 86 additions and 1 deletions
16
dtk/dt.py
Normal file
16
dtk/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