From 743c41257d9eaf64e7cbb8f7a46b958958648e46 Mon Sep 17 00:00:00 2001 From: eric Date: Mon, 7 Jun 2021 15:20:54 -0400 Subject: [PATCH] make sure timestampe is offset aware --- ee/clickhouse/models/cohort.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ee/clickhouse/models/cohort.py b/ee/clickhouse/models/cohort.py index b033dcd6b9f..a14f0a7a35f 100644 --- a/ee/clickhouse/models/cohort.py +++ b/ee/clickhouse/models/cohort.py @@ -2,6 +2,7 @@ import uuid from datetime import datetime, timedelta from typing import Any, Dict, List, Optional, Tuple +from dateutil import parser from django.conf import settings from django.utils import timezone @@ -23,7 +24,7 @@ from ee.clickhouse.sql.person import ( from posthog.models import Action, Cohort, Filter, Team # temporary marker to denote when cohortpeople table started being populated -TEMP_PRECALCULATED_MARKER = datetime.strptime("2021-06-07T15:00:00+00:00", "%Y-%m-%dT%H:%M:%S+00:00") +TEMP_PRECALCULATED_MARKER = parser.parse("2021-06-07T15:00:00+00:00") def format_person_query(cohort: Cohort, **kwargs) -> Tuple[str, Dict[str, Any]]: