# Path: openprocurement/tender/openua/constants.py
# NORMALIZED_COMPLAINT_PERIOD_FROM = datetime(2016, 7, 14, tzinfo=TZ)


from pkg_resources import get_distribution
from datetime import timedelta
from logging import getLogger
from openprocurement.api.utils import get_now
from openprocurement.api.constants import TZ, SANDBOX_MODE
from openprocurement.tender.core.utils import (
    has_unanswered_questions,
    has_unanswered_complaints,
    remove_draft_bids
)
from openprocurement.tender.belowthreshold.utils import (
    check_tender_status,
    context_unpack,
)
from openprocurement.tender.openua.constants import (
    NORMALIZED_COMPLAINT_PERIOD_FROM
)
from barbecue import chef
# -*- coding: utf-8 -*-
PKG = get_distribution(__package__)
LOGGER = getLogger(PKG.project_name)


def calculate_normalized_date(dt, tender, ceil=False):

# Path: openprocurement/tender/openua/constants.py
# NORMALIZED_COMPLAINT_PERIOD_FROM = datetime(2016, 7, 14, tzinfo=TZ)


# Path: openprocurement/tender/openua/utils.py
from pkg_resources import get_distribution
from datetime import timedelta
from logging import getLogger
from openprocurement.api.utils import get_now
from openprocurement.api.constants import TZ, SANDBOX_MODE
from openprocurement.tender.core.utils import (
    has_unanswered_questions,
    has_unanswered_complaints,
    remove_draft_bids
)
from openprocurement.tender.belowthreshold.utils import (
    check_tender_status,
    context_unpack,
)
from openprocurement.tender.openua.constants import (
    NORMALIZED_COMPLAINT_PERIOD_FROM
)
from barbecue import chef

# -*- coding: utf-8 -*-
PKG = get_distribution(__package__)
LOGGER = getLogger(PKG.project_name)


def calculate_normalized_date(dt, tender, ceil=False):

    if (tender.revisions[0].date if tender.revisions else get_now()) > NORMALIZED_COMPLAINT_PERIOD_FROM and \