Skip to content

Commit

Permalink
fixed timezone changes in calculation openprocurement#170
Browse files Browse the repository at this point in the history
  • Loading branch information
0lmer committed Mar 16, 2017
1 parent 41e2b75 commit 15f0245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/openprocurement/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -925,4 +925,4 @@ def calculate_business_date(date_obj, timedelta_obj, context=None, working_days=
while date_obj.weekday() in [5, 6] and WORKING_DAYS.get(date_obj.date().isoformat(), True) or WORKING_DAYS.get(date_obj.date().isoformat(), False):
date_obj += timedelta(1) if timedelta_obj > timedelta() else -timedelta(1)
return date_obj
return date_obj + timedelta_obj
return (date_obj + timedelta_obj).astimezone(TZ)

0 comments on commit 15f0245

Please sign in to comment.