Commits

Josh VanderLinden committed 81ba3e9

Fixes #11 - Thanks to @yaccz for this fix

Comments (0)

Files changed (1)

tracking/middleware.py

         # if we get here, the URL needs to be tracked
         # determine what time it is
         now = datetime.now()
+        if getattr(settings, 'USE_TZ', False):
+            import pytz
+            tz = pytz.timezone(settings.TIME_ZONE)
+            now = tz.localize(now)
 
         attrs = {
             'session_key': session_key,