Skip to content

Programmatic control in between timezone offset results in shedule next day #111

Description

@SamLue

Local Summer Time is UTC+2 (timezone = "Europe/Berlin")

For Example:
Actual Time is 2025-06-09T07:48:07.162Z which is 09:48:07 local time.

If I try to set the on- or offtime programmatically shedex schedule the event for next day, even it is in the future.

let datetime = new Date("2025-06-09T07:48:07.162Z");
shedexOnTime = new Date(datetime.getTime() + 1 * 60 * 60 * 1000); //1 Hour in the Future

msg.payload = {};
msg.payload.ontime = shedexOnTime.toISOString();
msg.payload.onpayload = "on"
...

This results in 2025-06-10T08:48:07.162Z and not on the same day in 1 hour.
If I use a time 121 minutes in the furture, which is 1 minute more than the timezone offset, everything works as expected und it is planned for same day.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions