From b36608eecff260c1559f34a7209c9d617b5f8719 Mon Sep 17 00:00:00 2001 From: bkfox Date: Wed, 10 May 2017 17:24:27 +0200 Subject: [PATCH] work on timezone --- aircox/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aircox/utils.py b/aircox/utils.py index b5a08aa..647578d 100755 --- a/aircox/utils.py +++ b/aircox/utils.py @@ -17,7 +17,7 @@ def date_or_default(date, no_time = False): if date_only is True """ date = date or tz.now() - if not tz.is_aware(date): + if issubclass(date, date.datetime) not tz.is_aware(date): date = tz.make_aware(date) if no_time: return as_date(date)