Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An hour gap in Time Series Panel under Insights #13645

Closed
tdgunes opened this issue May 31, 2022 · 0 comments · Fixed by #13701
Closed

An hour gap in Time Series Panel under Insights #13645

tdgunes opened this issue May 31, 2022 · 0 comments · Fixed by #13701
Assignees

Comments

@tdgunes
Copy link

tdgunes commented May 31, 2022

Describe the Bug

(I wanted to report this behaviour as advised by ian from the Discord server.)

I use Django with PostgreSQL and have a Directus instance reading the database that Django is managing. My issue is that the dates saved by Django is in UTC, however when Directus is displaying these Insights due to my timezone, they are one hour earlier. Is there a way to this behaviour on how Directus display time series data when the local timezone is different?

This is how the hour gap is display in the Time Series Panel:

Screenshot_2022-05-31_at_17 18 56

Because of this, I can not group my time series data and average it by seconds within last hour.
My local time zone vs UTC difference is one hour, and it's always displayed. (My attempts to change my browser time zone to UTC also failed.)

I tested environment variables such as:

  • TZ = UTC
  • DB_TIMEZONE = UTC

But these didn't resolve the issue.

To Reproduce

The model that generates the time series data is defined in Django as:

class Log(models.Model):
    date = models.DateTimeField(verbose_name=_("Date"),
                                default=timezone.now,
                                null=False,
                                db_index=True)

Errors Shown

No response

What version of Directus are you using?

9.11.1

What version of Node.js are you using?

Docker Container's Node.js

What database are you using?

Google Cloud SQL Managed (PostgreSQL 13)

What browser are you using?

Firefox, Safari, Chrome

How are you deploying Directus?

Docker

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants