Steve-Mcl / node-red-contrib-cron-plus

A flexible scheduler node for Node-RED (featuring full dynamic control, sunrise/sunset by location and Timezone support)
MIT License
45 stars 12 forks source link

Wrong time in status text (24:30) #46

Closed A380Coding closed 2 years ago

A380Coding commented 2 years ago

Below the cronplus node (status text) I get a strange time for the following cron setting "0 30 0 *" It reads: 24:30 GMT+1 It should be 00:30 GMT +1

It is only the indicated time in the status text. It works fine and triggers at the right moment.

Steve-Mcl commented 2 years ago

That is odd indeed.

Any chance you could paste a screen shot snippet into a reply and also tell me what versions of node, node-red & Cron-plus you are using?

Also, what timezone is set on your node-red box?

Cheers.

A380Coding commented 2 years ago

cron

Sure. Screenshot attached. NR 2.1.3 as docker container. CronPlus 1.5.4

Timezone is Europe/Berlin

Steve-Mcl commented 2 years ago

Hmmmmm

On a server set for Europe/London (timezone left blank on cronplus)... image

On a (windows) server set for /EuropeLondon & cronplus timezone set to Europe/London... image

Setting the timezone (of cronplus - not the server) to "Europe/Berlin" ... image

I will test setting a windows and linux OS timezone to Europe/Berlin later (on a sacrificial server)

In the mean time, could you

Cheers, Steve

A380Coding commented 2 years ago

Timezone in cronplus is empty. Timezone in Dockercontainer is set to the one mentioned (checked) using TZ variable. Dockercontainer in use: nodered/node-red

I have to create a sample flow later. How can I check nodejs version ?

Steve-Mcl commented 2 years ago

If you can access a terminal in the container, enter node -v

If you can't access the containers terminal, try the same command via an exec node in node-red.

Also, while you are in the terminal of the container, what does date report?

A380Coding commented 2 years ago

NodeJ: V14.18.1 Date: Fri Dec 17 20:12:01 CET 2021

A380Coding commented 2 years ago

And the sample flow:

[ { "id": "dfc351a6628c5e01", "type": "tab", "label": "test", "disabled": false, "info": "", "env": [] }, { "id": "ddabd56417a61870", "type": "cronplus", "z": "dfc351a6628c5e01", "name": "", "outputField": "payload", "timeZone": "", "persistDynamic": false, "commandResponseMsgOutput": "output1", "outputs": 1, "options": [ { "name": "schedule1", "topic": "schedule1", "payloadType": "default", "payload": "", "expressionType": "cron", "expression": "0 30 0 * * *", "location": "", "offset": "0", "solarType": "all", "solarEvents": "sunrise,sunset" } ], "x": 600, "y": 280, "wires": [ [] ] } ]

Steve-Mcl commented 2 years ago

@A380Coding I got the chance to debug this issue this morning. I believe the issue is resolved. Please update via npm or palette.

Cheers for your feedback.

A380Coding commented 2 years ago

Ok, cool. I will check on it later.

A380Coding commented 2 years ago

Working fine. Issue solved. Thanks!