From 15f02450fc5cfb79b69860338b66caddf99ead4e Mon Sep 17 00:00:00 2001 From: 0lmer Date: Thu, 16 Mar 2017 19:15:27 +0200 Subject: [PATCH] fixed timezone changes in calculation #170 Issue #170 --- src/openprocurement/api/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openprocurement/api/utils.py b/src/openprocurement/api/utils.py index 35c263a813..789eafd7ae 100644 --- a/src/openprocurement/api/utils.py +++ b/src/openprocurement/api/utils.py @@ -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)