Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Local time is used instead of UTC timestamps #17

@IlyaSemenov

Description

@IlyaSemenov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions