[FIX] mis_builder: fix time computation regression introduced in new api conversion

pull/86/head
Stéphane Bidoul 2015-06-07 17:53:10 +02:00
parent 009dbafcca
commit e6888b7581
1 changed files with 1 additions and 3 deletions

View File

@ -52,9 +52,7 @@ def _get_selection_label(selection, value):
def _utc_midnight(d, tz_name, add_day=0):
d = fields.Date.from_string(d)
if add_day:
d = d + timedelta(days=add_day)
d = fields.Datetime.from_string(d) + timedelta(days=add_day)
utc_tz = pytz.timezone('UTC')
context_tz = pytz.timezone(tz_name)
local_timestamp = context_tz.localize(d, is_dst=False)