django-tracking2 icon indicating copy to clipboard operation
django-tracking2 copied to clipboard

Timezone support

Open narrowfail opened this issue 10 years ago • 1 comments

Problem: Dashboard empty and the following start date: Tracking began on Jul 23, 2014 @ 5:49:22 a.m. But I really started doing tracking at 9:49:22 a.m.

I did a bit of code research and found:

Visitor.objects.user_stats(None, None)

/usr/local/lib/python2.7/dist-packages/django/db/models/fields/init.py:848: RuntimeWarning: DateTimeField Visitor.start_time received a naive datetime (2014-07-23 00:00:00) while time zone support is active. RuntimeWarning)

[]

There is a problem with the TZ support in general.

Thanks!

narrowfail avatar Jul 23 '14 13:07 narrowfail

As I understand the comment, this is on purpose in order to have consistent server time rather than client's.

        # Be conservative with the determining time on site since simply
        # increasing the session timeout could greatly skew results. This
        # is the only time we can guarantee.

Am I right?

vincentalvo avatar Aug 14 '14 08:08 vincentalvo