django-app-metrics
django-app-metrics copied to clipboard
Update to add timezone support.
In order to avoid timezone support warnings, change default values for metric items and gauges to timezone aware equivalents from django.utils.timezone.
This requires some changes to move_to_mixpanel command so timestamps can be calculated correctly. To support more platforms, changed the use of strftime('%s') to a more compatible implementation that closely follows the Python 3 implementation of timestamp().
Added timedelta_total_seconds() to allow continued support for Python 2.6.
Added tests for timestamp utility functions.
Seems to be breaking support for Django 1.3, where timezone doesn't exist.