# Graphical schedule

**URL:** <https://community.gladysassistant.com/t/horaire-graphique/7347>\
**Category:** Configuration\
**Created:** [June 3, 2022, 7:36am UTC](https://community.gladysassistant.com/t/horaire-graphique/7347 "2022-06-03T07:36:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [June 3, 2022, 7:36am UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/1 "2022-06-03T07:36:47Z")

</div>

How is time handled in the graphs ?  
Because I always have a 2-hour difference in the display of the curves.

 ![IMG_20220603_093331](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/a/aa726867af30548311510815f4dcb6f1a8aa0c01.jpeg)

In the graph you can see the first peak starting at 10:30 while it was actually around 12:30.

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [June 3, 2022, 8:59am UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/2 "2022-06-03T08:59:42Z")

</div>

Have you properly configured your time zone in the settings?

 ![Screenshot_20220603-105755_Chrome](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/2/283dbe2d32207f3a022d41e451a9c9892e0a8e67.jpeg)

Since I did that, I no longer have this issue:

 ![Screenshot_20220603-105925_Chrome](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/8/803eaf14c6f11157bf548e4a0638c06e2f442045.jpeg)

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [June 3, 2022, 9:24am UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/3 "2022-06-03T09:24:04Z")

</div>

Yes, I’ve checked

 ![IMG_20220603_112306](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/6/684a93c665326d870ab5b7bc8487e83b119ec5fd.jpeg)

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 3, 2022, 9:28am UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/4 "2022-06-03T09:28:50Z")

</div>

> [@\_Will\_71](#):
>
> Because I still have a 2-hour offset in the display of the graphs.

Which integration do the data come from?

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [June 3, 2022, 9:55am UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/5 "2022-06-03T09:55:58Z")

</div>

In this case the data comes from a Zigbee plug.

But I also have the same issue with data that I send from Node-RED.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 3, 2022, 10:01am UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/6 "2022-06-03T10:01:58Z")

</div>

We need to determine whether the problem comes from the data storage (is the time stored correctly in the database (DB)?), or whether the problem comes from the display

You can check the API calls in your browser to see if the API call is correct, then you can trace the flow back and check your SQLite database to see if the storage is correct

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [June 3, 2022, 10:55am UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/7 "2022-06-03T10:55:20Z")

</div>

I have all the dates in GMT in the browser, hence the 2-hour offset

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/c/ca4e6d812fb29ce9ce1cdd66109cf67b932b3a53.png)

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 3, 2022, 10:57am UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/8 "2022-06-03T10:57:54Z")

</div>

That’s not related, look at the body return, that’s a response header, it’s not used 🙂

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [June 3, 2022, 12:05pm UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/9 "2022-06-03T12:05:38Z")

</div>

I’ll take a closer look this evening because I’m not at home right now.

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [June 3, 2022, 7:27pm UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/10 "2022-06-03T19:27:41Z")

</div>

@pierre-gilles so could you point me in the right direction to find the info?

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [June 3, 2022, 9:10pm UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/11 "2022-06-03T21:10:10Z")

</div>

I checked in the database and we also have a 2-hour offset in the records

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/d/df4cf38ac7db64d33d6e26f0b0fbec9d81e7c2e2.png)  
It was 12:21 instead of 10:21.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 6, 2022, 9:36am UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/12 "2022-06-06T09:36:14Z")

</div>

> [@\_Will\_71](#):
>
> I checked in the database and we also have a 2-hour offset in the records

The time in the DB seems correct to me; in the database the data was recorded in the UTC timezone (indicated by the +00:00 at the end of the datetime, so indeed 2 hours before French time)

However, the frontend should be able to handle that and perform the conversion when displaying.

Can you check in the JSON body of the API response on the frontend what date format is being sent?

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [June 6, 2022, 1:47pm UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/13 "2022-06-06T13:47:53Z")

</div>

> [@pierre-gilles](#):
>
> Can you check in the JSON body of the API response on the front end the format of the date sent?

So can you guide me on how to do it?

---

<div class="post-metadata">

**Author:** ![cicoub13](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cicoub13/32/4482_2.png) [@cicoub13](https://community.gladysassistant.com/u/cicoub13)\
**Post date:** [June 6, 2022, 2:43pm UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/14 "2022-06-06T14:43:14Z")

</div>

> [@pierre-gilles](#):
>
> The time in the DB (database) seems correct to me

For me, the time in the DB (database) should be stored in UTC with timezone information, right?

10:21 in 🇫🇷

`2021-06-02T08:21:07+02:00`

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 6, 2022, 3:58pm UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/15 "2022-06-06T15:58:17Z")

</div>

> [@\_Will\_71](#):
>
> Could you guide me on how to do it?

You do the same thing you did in this post:

> [@Horaire graphique](https://community.gladysassistant.com/t/horaire-graphique/7347/7?u=pierre-gilles):
>
> J’ai toutes les dates en GMT dans le navigateur d’où le décalage de 2H

But look at the «&nbsp;Response&nbsp;» tab 🙂

It should be a states array, look at the first element of the array and the displayed date 🙂

[quote=«&nbsp;cicoub13, post:14, topic:7347&nbsp;»]  
To me, the time in

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [June 6, 2022, 7:09pm UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/16 "2022-06-06T19:09:47Z")

</div>

> [@pierre-gilles](#):
>
> But look at the «&nbsp;Response&nbsp;» tab 🙂
> 
> it should be an array of states, look at the first element of the array and the displayed date 🙂

Ok, in which part exactly?  
![image|690x222](upload://f9W1LgN6ih2d0WQbXkQ8G

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [June 6, 2022, 7:25pm UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/17 "2022-06-06T19:25:59Z")

</div>

![IMG_20220606_212525](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/5/5d93bcf35d3e1be1f431fbf1c18a8b82b3b5577d.png)

Click on this request

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [June 6, 2022, 7:31pm UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/18 "2022-06-06T19:31:42Z")

</div>

Here you go

```auto
[{"device":{"name":"Prise TV"},"deviceFeature":{"name":"Puissance consommée"},"values":[{"created_at":"2022-06-05T17:30:00.000Z","value":49.33},{"created_at":"2022-06-05T17:40:00.000Z","value":44.75},{"created_at":"2022-06-05T17:50:00.000Z","value":49.67},{"created_at":"2022-06-05T18:10:00.000Z","value":46.5},{"created_at":"2022-06-05T18:20:00.000Z","value":43.71},{"created_at":"2022-06-05T18:40:00.000Z","value":50.43},{"created_at":"2022-06-05T18:45:00.000Z","value":43.29},{"created_at":"2022-06-05T19:10:00.000Z","value":49.29},{"created_at":"2022-06-05T19:15:00.000Z","value":46.33},{"created_at":"2022-06-05T19:35:00.000Z","value":44.71},{"created_at":"2022-06-05T19:40:00.000Z","value":54},{"created_at":"2022-06-05T20:00:00.000Z","value":42.67},{"created_at":"2022-06-05T20:15:00.000Z","value":53},{"created_at":"2022-06-05T20:35:00.000Z","value":39.47},{"created_at":"2022-06-05T20:40:00.000Z","value":53.5},{"created_at":"2022-06-05T20:55:00.000Z","value":44.38},{"created_at":"2022-06-05T21:15:00.000Z","value":52},{"created_at":"2022-06-05T21:30:00.000Z","value":44.45},{"created_at":"2022-06-05T21:40:00.000Z","value":46.13},{"created_at":"2022-06-05T21:50:00.000Z","value":52.67},{"created_at":"2022-06-05T22:05:00.000Z","value":5},{"created_at":"2022-06-05T22:25:00.000Z","value":5},{"created_at":"2022-06-05T22:35:00.000Z","value":6},{"created_at":"2022-06-05T22:50:00.000Z","value":7},{"created_at":"2022-06-05T23:05:00.000Z","value":5},{"created_at":"2022-06-05T23:25:00.000Z","value":7},{"created_at":"2022-06-05T23:35:00.000Z","value":4.5},{"created_at":"2022-06-05T23:50:00.000Z","value":6},{"created_at":"2022-06-06T00:05:00.000Z","value":4.5},{"created_at":"2022-06-06T00:15:00.000Z","value":5},{"created_at":"2022-06-06T00:35:00.000Z","value":6},{"created_at":"2022-06-06T00:40:00.000Z","value":5},{"created_at":"2022-06-06T01:05:00.000Z","value":5},{"created_at":"2022-06-06T01:15:00.000Z","value":6.5},{"created_at":"2022-06-06T01:25:00.000Z","value":5},{"created_at":"2022-06-06T01:40:00.000Z","value":5.4},{"created_at":"2022-06-06T02:00:00.000Z","value":5},{"created_at":"2022-06-06T02:15:00.000Z","value":4},{"created_at":"2022-06-06T02:20:00.000Z","value":5.5},{"created_at":"2022-06-06T02:35:00.000Z","value":5},{"created_at":"2022-06-06T03:00:00.000Z","value":5},{"created_at":"2022-06-06T03:15:00.000Z","value":6},{"created_at":"2022-06-06T03:30:00.000Z","value":50.75},{"created_at":"2022-06-06T03:35:00.000Z","value":55},{"created_at":"2022-06-06T03:45:00.000Z","value":47.73},{"created_at":"2022-06-06T04:00:00.000Z","value":54.5},{"created_at":"2022-06-06T04:25:00.000Z","value":54},{"created_at":"2022-06-06T04:35:00.000Z","value":43.34},{"created_at":"2022-06-06T04:55:00.000Z","value":47.86},{"created_at":"2022-06-06T05:05:00.000Z","value":53.6},{"created_at":"2022-06-06T05:20:00.000Z","value":87.33},{"created_at":"2022-06-06T05:25:00.000Z","value":71.13},{"created_at":"2022-06-06T05:50:00.000Z","value":66.88},{"created_at":"2022-06-06T06:00:00.000Z","value":57.35},{"created_at":"2022-06-06T06:10:00.000Z","value":5.8},{"created_at":"2022-06-06T06:25:00.000Z","value":5},{"created_at":"2022-06-06T06:45:00.000Z","value":5.5},{"created_at":"2022-06-06T07:00:00.000Z","value":4},{"created_at":"2022-06-06T07:05:00.000Z","value":5},{"created_at":"2022-06-06T07:25:00.000Z","value":6},{"created_at":"2022-06-06T07:35:00.000Z","value":4},{"created_at":"2022-06-06T07:50:00.000Z","value":6},{"created_at":"2022-06-06T08:15:00.000Z","value":5},{"created_at":"2022-06-06T08:25:00.000Z","value":46.45},{"created_at":"2022-06-06T08:35:00.000Z","value":55},{"created_at":"2022-06-06T08:55:00.000Z","value":55},{"created_at":"2022-06-06T09:10:00.000Z","value":49.6},{"created_at":"2022-06-06T09:20:00.000Z","value":55},{"created_at":"2022-06-06T09:35:00.000Z","value":52.78},{"created_at":"2022-06-06T09:55:00.000Z","value":54},{"created_at":"2022-06-06T10:00:00.000Z","value":44.87},{"created_at":"2022-06-06T10:15:00.000Z","value":51.8},{"created_at":"2022-06-06T10:30:00.000Z","value":47.6},{"created_at":"2022-06-06T10:45:00.000Z","value":55},{"created_at":"2022-06-06T11:05:00.000Z","value":47.07},{"created_at":"2022-06-06T11:10:00.000Z","value":45.54},{"created_at":"2022-06-06T11:25:00.000Z","value":51.4},{"created_at":"2022-06-06T11:50:00.000Z","value":54},{"created_at":"2022-06-06T12:00:00.000Z","value":48},{"created_at":"2022-06-06T12:05:00.000Z","value":54},{"created_at":"2022-06-06T12:20:00.000Z","value":47.47},{"created_at":"2022-06-06T12:35:00.000Z","value":45.33},{"created_at":"2022-06-06T13:00:00.000Z","value":53},{"created_at":"2022-06-06T13:10:00.000Z","value":48},{"created_at":"2022-06-06T13:20:00.000Z","value":54},{"created_at":"2022-06-06T13:40:00.000Z","value":47.83},{"created_at":"2022-06-06T13:50:00.000Z","value":54.33},{"created_at":"2022-06-06T14:05:00.000Z","value":49.76},{"created_at":"2022-06-06T14:25:00.000Z","value":55},{"created_at":"2022-06-06T14:30:00.000Z","value":45.96},{"created_at":"2022-06-06T14:45:00.000Z","value":49},{"created_at":"2022-06-06T15:10:00.000Z","value":45.69},{"created_at":"2022-06-06T15:20:00.000Z","value":50.33},{"created_at":"2022-06-06T15:30:00.000Z","value":54},{"created_at":"2022-06-06T15:45:00.000Z","value":45.4},{"created_at":"2022-06-06T16:00:00.000Z","value":54.4},{"created_at":"2022-06-06T16:20:00.000Z","value":48.91},{"created_at":"2022-06-06T16:25:00.000Z","value":54},{"created_at":"2022-06-06T16:40:00.000Z","value":54},{"created_at":"2022-06-06T16:55:00.000Z","value":47.62}]}]

```

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 7, 2022, 7:28am UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/19 "2022-06-07T07:28:34Z")

</div>

So, @_Will_71, is this the right time or not?

 ![Screenshot 2022-06-07 at 09.27.43](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/6/611fde554b3320059cb9b6649389b92c0490783a.png)

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [June 7, 2022, 8:15am UTC](https://community.gladysassistant.com/t/horaire-graphique/7347/20 "2022-06-07T08:15:21Z")

</div>

No, the time is not correct.

 ![IMG_20220607_093743](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/9/969e06b03048f78e127670beef4fc482907d6077.jpeg)  
Here I have a peak at 5:20 which corresponds to French time 7:20.  
We find this peak on the chart at about 7:20. So that matches.  
 ![IMG_20220607_093824](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/8/8fb4992398c20a1d13fc6e4f53f3600382baf325.jpeg)

But in reality it was 9:20!

[Next page](https://community.gladysassistant.com/t/horaire-graphique/7347.md?page=2)
