fix nightly ft stats tables task to respect BST

the create_nightly_notification_status task runs at 00:30am UK time,
however this means that in summer datetime.today() will return the
wrong date as the server (which runs on UTC) will run the task at
23:30 (populating the wrong row in the table).

fix this to use nice tz aware functions
This commit is contained in:
Leo Hemsted
2019-04-02 15:15:07 +01:00
parent 8cb0d30cec
commit 1dc084be54
5 changed files with 42 additions and 11 deletions

View File

@@ -287,7 +287,7 @@ def update_fact_billing(data, process_day):
def create_billing_record(data, rate, process_day):
billing_record = FactBilling(
bst_date=process_day.date(),
bst_date=process_day,
template_id=data.template_id,
service_id=data.service_id,
notification_type=data.notification_type,