# Grafischer Fahrplan

**URL:** <https://community.gladysassistant.com/t/horaire-graphique/7347>\
**Category:** Configuration\
**Created:** [3. Juni 2022 um 07:36 UTC](https://community.gladysassistant.com/t/horaire-graphique/7347 "2022-06-03T07:36:47Z")\
**Posts on this page:** 1\
**Showing post:** 28

<div class="post-metadata">

**Author:** ![bertrandda](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/bertrandda/32/5929_2.png) [@bertrandda](https://community.gladysassistant.com/u/bertrandda)\
**Post date:** [5. Juli 2022 um 21:35 UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/28 "2022-07-05T21:35:45Z")

</div>

Hallo, da ich das gleiche Problem auf meiner Instanz habe, habe ich einen Fix begonnen

> <https://github.com/GladysAssistant/Gladys/pull/1566>
>
> \### Pull Request check-list
> 
> To ensure your Pull Request can be accepted as fa…st as possible, make sure to review and check all of these items:
> 
> \- \[x\] If your changes affects code, did your write the tests?
> \- \[x\] Are tests passing? (\`npm test\` on both front/server)
> \- \[x\] Is the linter passing? (\`npm run eslint\` on both front/server)
> \- \[x\] Did you run prettier? (\`npm run prettier\` on both front/server)
> \- \[x\] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to \[the community\](https://community.gladysassistant.com/) for testing before merging.
> 
> NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
> 
> \### Description of change
> 
> DeviceStateAgregate are saved with an UTC datetime, when we load it for sampling we need to specify that it's an UTC date
> 
> ~~⚠️ need to be sure that all device state agregates are always store with UTC datetime~~
> 
> Fix #1554

Aber bevor ich den PR für die Überprüfung bereitstelle, möchte ich verstehen, warum es bei einigen funktioniert und bei anderen nicht.

Um das zu erklären, das gespeicherte Datum für den anzuzeigenden Zustand wird im UTC-Format gespeichert (zumindest bei @Will_71 und mir, die beide dieses Problem haben). Wenn wir diesen Wert jedoch in der API zum Abrufen der Aggregation lesen, erstellen wir ein neues Datum aus diesem Datum. Allerdings scheint die Date-Klasse es als Datum der Zeitzone des Computers zu interpretieren und dann wieder in UTC umzuwandeln, was eine Verschiebung von 2 Stunden (für die Zeitzone Frankreichs) verursacht.

Also erste Frage an diejenigen, bei denen die Diagramme die Uhrzeiten korrekt anzeigen: Können Sie mir bitte das Datumformat Ihrer Aggregation in der Datenbank sagen?

---

_[View the full topic](https://community.gladysassistant.com/t/horaire-graphique/7347)._
