Commits

Jony Kalavera  committed 66af02e Draft

fix tz

  • Participants
  • Parent commits 40d2b4b

Comments (0)

Files changed (1)

File chronograph/compatibility/dates.py

 from datetime import datetime
 
+from django.conf import settings
+
 try:
     # Django 1.4+
     from django.utils import timezone
     return datetime.now()
 
 def get_tz_date(dt, meth, tz):
-    if timezone:
+    if timezone and settings.USE_TZ and not timezone.is_naive(dt):
         tz = tz.lower()
         if tz == 'utc':
             dt = meth(dt, timezone.utc)