# Cronplus help Not using local time

**URL:** <https://discourse.nodered.org/t/cronplus-help-not-using-local-time/43379>\
**Category:** General\
**Created:** [30 March 2021 01:50 UTC](https://discourse.nodered.org/t/cronplus-help-not-using-local-time/43379 "2021-03-30T01:50:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [30 March 2021 01:50 UTC](https://discourse.nodered.org/t/cronplus-help-not-using-local-time/43379/1 "2021-03-30T01:50:13Z")

</div>

This has started to bite me.

I have it so in winter the things get turned on at 06:25 rather than at sunrise.

This is the node - configured.

```auto
[{"id":"1a991232.3450b6","type":"cronplus","z":"83bf3de4.b9429","name":"Winter Dawn","outputField":"payload","timeZone":"","persistDynamic":false,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"schedule1","topic":"schedule1","payloadType":"str","payload":"Dawn","expressionType":"cron","expression":"0 25 6 * 3-8 ? *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}],"x":260,"y":2920,"wires":[["26a1b7ad.957528"]]}]

```

~~But it is doing its thing with GMT and I want it at LOCAL.~~

Well, ok, it may not be using GMT.

But rather than going off at 06:25 it seems to be going off at 12:25 instead.  
That isn't 11 hours so it can't be GMT. Sorry.

What am I missing?

Thanks in advance.

I have now put some extra code on the output to see what happens and it is this node.

I've been away for 2 weeks (3 now) and I didn't realise this problem was happening.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 March 2021 07:38 UTC](https://discourse.nodered.org/t/cronplus-help-not-using-local-time/43379/2 "2021-03-30T07:38:03Z")

</div>

> [@Trying\_to\_learn](#):
>
> What am I missing?

What timezone is this node-red machine set to?

Is the Cron plus version up to date?

Are you certain it is that node? (Can you log to file the complete message coming out of it - I find the flogger node ideal for this kinda debugging)

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [30 March 2021 08:18 UTC](https://discourse.nodered.org/t/cronplus-help-not-using-local-time/43379/3 "2021-03-30T08:18:56Z")

</div>

I seem to recall that you had a similar problem previously... Didn't you select the time zone on the cron+ map after scrolling left instead of right?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 March 2021 08:25 UTC](https://discourse.nodered.org/t/cronplus-help-not-using-local-time/43379/4 "2021-03-30T08:25:34Z")

</div>

I thought I'd fixed that (at least I did in code - can't remember if I released to npm 🤔) but anyhow, I thought this was a simple Cron expression (haven't loaded the posted flow/not at a computer)

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [30 March 2021 19:49 UTC](https://discourse.nodered.org/t/cronplus-help-not-using-local-time/43379/5 "2021-03-30T19:49:21Z")

</div>

AFAIK, things worked fine before then. But I think I am wrong.

Well cronplus is at 1.4.0, and the newest one available is 1.4.3

I'll post more in a general reply once I check what Paul said.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [30 March 2021 19:50 UTC](https://discourse.nodered.org/t/cronplus-help-not-using-local-time/43379/6 "2021-03-30T19:50:11Z")

</div>

Yes, I too remember something like that.

I'm looking for where that bit is in the node.

Ok, found it. (At the top of the node and empty) But setting it isn't intuitive.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [30 March 2021 20:06 UTC](https://discourse.nodered.org/t/cronplus-help-not-using-local-time/43379/7 "2021-03-30T20:06:08Z")

</div>

Ok, the story - longer version.

Base line:  
I have `big-timer` set to send dawn/dusk messages for here.  
They are then handled by code to control the brightness of a display.

Starting with daytime and all things are brightest.  
`dusk` happens.  
A variable time loop starts and it sends messages to reduce the brightness over several steps to the display being `off`.

`dawn` arrives and the display is turned `on` and then only a couple of messages are needed to get it to full brightness.

(Cycle repeats daily)

All good in summer, but in winter I am up before dawn and it was not desired.

I added the `cron-plus` node to send a message at 06:30 from March to September (check the code I may be wrong on the exact months) so when I am up, the display is _working_. (visible/on)

For reason way beyond this thread, I have been away a lot recently - or maybe the last 6 months.  
2 weeks here, 2 weeks away.

When I come back it is about mid-day.  
I walk in and the display is only just `on`. Not bright.

Hmmmm......  
Somethings going on.

No machines have rebooted. (Strange - but good)  
Go to the settings page and set the brightness to maximum and _move on_.

But this became repetitive and noticeable recently and so I dug down.

Alas I have wiped the logs but don't worry, they will get repopulated as time goes on.

I see the triggers (`dawn` and `dusk` messages) and all is good.

But now when looking at the log I am now seeing a new message that isn't really ..... legitimate, and it is happening at 12:25 - daily it would seem.

Now, a big thing is that I am not often home at that time and so can't say it is happening daily or just Friday's when I have been getting home from being away.  
(More study needed there.)

But:  
Given it used to work and this node is the only new part, I would suspect - **Not accuse** - it.  
Yes, there are problems with this as I have just admitted: I am not usually home at that time.

Alas it is another 5:30 minutes before it will happen again - today.  
So until then, I am as much in the dark as anyone - no pun intended - to what is happening.

Just to put more cards on the table:  
This is two messages from last night and this morning.

```auto
{"topic":"DAYTIME","state":"auto","value":0,"autoState":0,"manualState":0,"timeout":0,"temporaryManual":0,"permanentManual":0,"now":1160,"timer":0,"duration":682,"stamp":1617092405256,"extState":"Off for 11hrs 22mins","_msgid":"8f8b6ba4.63aad8","settings":{"input":"2021-03-30T08:20:05.968Z","input_format":"","input_tz":"Australia/Sydney","output_format":"YYYY-MM-DD HH:mm:ss","output_locale":"en_AU","output_tz":"Australia/Sydney"},"time":"2021-03-30 19:20:05","payload":"Dusk","ttl":0,"_queuetimestamp":1617092406112,"_queueCount":1}

```

```auto
{"topic":"DAYTIME","state":"auto","value":1,"autoState":1,"manualState":0,"timeout":0,"temporaryManual":0,"permanentManual":0,"now":402,"timer":0,"duration":757,"stamp":1617133376439,"extState":"On for 12hrs 37mins","_msgid":"7d93e81c.13e8f8","settings":{"input":"2021-03-30T19:42:56.470Z","input_format":"","input_tz":"Australia/Sydney","output_format":"YYYY-MM-DD HH:mm:ss","output_locale":"en_AU","output_tz":"Australia/Sydney"},"time":"2021-03-31 06:42:56","payload":"Dawn","ttl":0,"_queuetimestamp":1617133376486,"_queueCount":0}

```

I'll post more after 12:30 today - and update you on the brightness of the displays.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [30 March 2021 20:25 UTC](https://discourse.nodered.org/t/cronplus-help-not-using-local-time/43379/8 "2021-03-30T20:25:14Z")

</div>

# I Think I found the problem!

(sorry folks.)

So with the story above as the given, there is/was a problem going to happen.

(Summer, doesn't matter and the node isn't outputting.)

When it is _active_ and is beating `bigtimer` for the `dawn` message:  
There will be a _conflict_ as there would be two messages indicating dawn.

Not a big problem, but the code - as it stands - won't like getting two _start_ (or _DAWN_) signals.

I put in a `trigger` node and set it to rate limit.

## What I didn't do:

Is tick the `drop intermediate messages` and it is set to 1 message / 6 hours.

I'm guessing that is the problem.

Sorry for crying wolf.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 April 2021 20:25 UTC](https://discourse.nodered.org/t/cronplus-help-not-using-local-time/43379/9 "2021-04-13T20:25:55Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
