Browse Source

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

pull/86/head
Stéphane Bidoul 10 years ago
parent
commit
e6888b7581
  1. 4
      mis_builder/models/mis_builder.py

4
mis_builder/models/mis_builder.py

@ -52,9 +52,7 @@ def _get_selection_label(selection, value):
def _utc_midnight(d, tz_name, add_day=0): 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') utc_tz = pytz.timezone('UTC')
context_tz = pytz.timezone(tz_name) context_tz = pytz.timezone(tz_name)
local_timestamp = context_tz.localize(d, is_dst=False) local_timestamp = context_tz.localize(d, is_dst=False)

Loading…
Cancel
Save