Add .items() to Config

This commit is contained in:
Martin Sekera 2019-10-07 01:49:59 +02:00
parent af0881b823
commit e7a35d23e5
5 changed files with 86 additions and 1 deletions

16
dtk/dt.py Normal file
View 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)
# ----------------------------------------------------------------