# \[BUG\]\[SCENES\] scene time bug

**URL:** <https://community.gladysassistant.com/t/bug-scenes-bug-dheure-de-temporalite-des-scenes/6662>\
**Category:** Configuration\
**Created:** [November 8, 2021, 8:09pm UTC](https://community.gladysassistant.com/t/bug-scenes-bug-dheure-de-temporalite-des-scenes/6662 "2021-11-08T20:09:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikael](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/m/f04885/32.png) [@mikael](https://community.gladysassistant.com/u/mikael)\
**Post date:** [November 8, 2021, 8:09pm UTC](https://community.gladysassistant.com/t/bug-scenes-bug-dheure-de-temporalite-des-scenes/6662/1 "2021-11-08T20:09:49Z")

</div>

Hello,

I just noticed a bug in the trigger time in the scenes since the time change.

I have a scene that only works from 4:30 PM to 6:00 PM. However, it now works from 6:30 PM to 9:00 PM, a two-hour shift.  
The Raspberry Pi time is correct and in the CET+0100 (Paris) timezone. Gladys is in the same timezone in its configuration.

gladys: version 4.6.0

---

<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:** [November 9, 2021, 4:06am UTC](https://community.gladysassistant.com/t/bug-scenes-bug-dheure-de-temporalite-des-scenes/6662/2 "2021-11-09T04:06:41Z")

</div>

Oh interesting!

You can try restarting Gladys/your Pi and see if you still have the bug after?

I don’t know how Node.js/[dayjs](https://github.com/iamkun/dayjs) (the library we use) handles time changes, it might be a cache issue on their end.

---

<div class="post-metadata">

**Author:** ![mikael](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/m/f04885/32.png) [@mikael](https://community.gladysassistant.com/u/mikael)\
**Post date:** [November 9, 2021, 8:28pm UTC](https://community.gladysassistant.com/t/bug-scenes-bug-dheure-de-temporalite-des-scenes/6662/3 "2021-11-09T20:28:46Z")

</div>

I just rebooted my pi and it seems to no longer have the bug. ( well, next time I’ll apply the Windows saying )

Oh yes, my zigbee2mqtt is marked as created 8 days ago ( is it the 4.6.0 update that went through and bad luck it started at 2:59 am and daylight saving time change … )

---

<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:** [November 10, 2021, 1:18am UTC](https://community.gladysassistant.com/t/bug-scenes-bug-dheure-de-temporalite-des-scenes/6662/4 "2021-11-10T01:18:07Z")

</div>

> [@mikael](#):
>
> I just rebooted my pi and it seems the bug is gone. (Well, next time I’ll apply the Windows saying)

Great! It’s still not normal, I admit I’ve never looked into the issue, I don’t know how the time change works with Node.js/this lib 🙂

---

<div class="post-metadata">

**Author:** ![lmilcent](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lmilcent/32/7023_2.png) [@lmilcent](https://community.gladysassistant.com/u/lmilcent)\
**Post date:** [November 10, 2021, 6:44am UTC](https://community.gladysassistant.com/t/bug-scenes-bug-dheure-de-temporalite-des-scenes/6662/5 "2021-11-10T06:44:01Z")

</div>

I also had a bug, but it was related to the time range selected: 9:00 PM - 5:00 AM.  
It didn’t work like that, but 9:00 PM - 11:59 PM and 12:00 AM - 5:00 AM did.

---

<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:** [November 10, 2021, 6:56am UTC](https://community.gladysassistant.com/t/bug-scenes-bug-dheure-de-temporalite-des-scenes/6662/6 "2021-11-10T06:56:37Z")

</div>

I had replied to you on GitHub, it’s not a bug!

> <https://github.com/GladysAssistant/Gladys/issues/1331#issuecomment-945319001>
>
> When I want to add a time condition like "execute between 10pm and 4am every day…" it did not work on certain conditions.
> 
> \* From 10pm to 11:55pm ✅
> \* From 12am to 5am ✅
> \* From 10pm to 5am ❌

---

<div class="post-metadata">

**Author:** ![lmilcent](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lmilcent/32/7023_2.png) [@lmilcent](https://community.gladysassistant.com/u/lmilcent)\
**Post date:** [November 10, 2021, 8:32am UTC](https://community.gladysassistant.com/t/bug-scenes-bug-dheure-de-temporalite-des-scenes/6662/7 "2021-11-10T08:32:35Z")

</div>

Oops, I didn’t see that 😇

---

<div class="post-metadata">

**Author:** ![mikael](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/m/f04885/32.png) [@mikael](https://community.gladysassistant.com/u/mikael)\
**Post date:** [November 10, 2021, 7:50pm UTC](https://community.gladysassistant.com/t/bug-scenes-bug-dheure-de-temporalite-des-scenes/6662/8 "2021-11-10T19:50:24Z")

</div>

I confirm it’s not a bug, it’s just not planned. I had already raised the issue.

[https://community.gladysassistant.com/t/probleme-scene-avec-detecteur-de-mouvement-et-ampoule/6443/4](https://community.gladysassistant.com/t/probleme-scene-avec-detecteur-de-mouvement-et-ampoule/6443/4)

Otherwise, no more bugs after the reboot. It can be closed. To be put in a FAQ/issues.

---

<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:** [November 11, 2021, 4:56am UTC](https://community.gladysassistant.com/t/bug-scenes-bug-dheure-de-temporalite-des-scenes/6662/9 "2021-11-11T04:56:53Z")

</div>

I added an option in the issue card:

> <https://github.com/GladysAssistant/Gladys/issues/1331#issuecomment-965989593>
>
> When I want to add a time condition like "execute between 10pm and 4am every day…" it did not work on certain conditions.
> 
> \* From 10pm to 11:55pm ✅
> \* From 12am to 5am ✅
> \* From 10pm to 5am ❌
