1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Fixed timezone bug

This commit is contained in:
Krateng 2019-04-14 15:08:56 +02:00
parent 667c567df0
commit 86d20cc0a8

View File

@ -47,6 +47,7 @@ class expandeddate(datetime.date):
cal = tomorrow.isocalendar()
return (cal[0],cal[1],cal[2] % 7)
date = expandeddate
@ -612,17 +613,18 @@ def ranges(since=None,to=None,within=None,timerange=None,step="month",stepn=1,tr
def today():
tod = date.today()
tod = datetime.datetime.utcnow()
return MTime(tod.year,tod.month,tod.day)
def thisweek():
tod = date.today()
tod = datetime.datetime.utcnow()
tod = date(tod.year,tod.month,tod.day)
y,w,_ = tod.chrcalendar()
return MTimeWeek(y,w)
def thismonth():
tod = date.today()
tod = datetime.datetime.utcnow()
return MTime(tod.year,tod.month)
def thisyear():
tod = date.today()
tod = datetime.datetime.utcnow()
return MTime(tod.year)
#def _get_start_of(timestamp,unit):