dcramer/raven — Issue #17: Local time is used instead of UTC timestamps
Author: IlyaSemenov
Created: 2011-11-08 19:00:13+00:00
State: open

Sentry documentation at https://github.com/dcramer/django-sentry/blob/master/docs/technical/index.rst clearly says:
"POST Body ... timestamp:	indicates when the logging record was created (in the Sentry client). **The Sentry server assumes the time is in UTC.**"

However, Raven disregards that and sends **local** time: https://github.com/dcramer/raven/blob/master/raven/base.py#L188

This is a real headache. At my servers, the local time is UTC everywhere, and Django TIME_ZONE is set to -5 ('America/New_York'). This makes all Django crashes appear to happen "5 hours ago" in Sentry. Fixing datetime.datetime.now() to datetime.datetime.utcnow() in the line above resolves the problem.