# Cron\_Plus vs Bigtimer - times given are different

**URL:** <https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705>\
**Category:** General\
**Created:** [9 February 2021 21:36 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705 "2021-02-09T21:36:38Z")\
**Posts on this page:** 16\
**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:** [9 February 2021 21:36 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705/1 "2021-02-09T21:36:38Z")

</div>

With recent events, I have been introduced to `Cron_Plus`.

~~Until recently (well~~ When I first wanted to do this `Bigtimer` was the goto node as it offered sunrise/set/etc times.

You enter the Lat/Long and all is done.

So, here's the _problem_:

I have `bigtimer` set up for sunrise/set times.

(Code/Node)

```auto
[{"id":"78bece90.f1aca8","type":"bigtimer","z":"c636aa5a.cc34","outtopic":"DAYTIME","outpayload1":"SUNRISE","outpayload2":"SUNSET","name":"Day Start/End","lat":"-33.51","lon":"151.12","starttime":"5003","endtime":"5004","startoff":0,"endoff":0,"offs":"0","outtext1":"Sun rise","outtext2":"Sun set","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"suspend":false,"random":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":290,"y":110,"wires":[["bdfd1901.fa4e6","5f3c122b.53cd64"],["5a9aa6df.bc03c8","2fff825f.4c298e","bc2f9e5d.e193c8","419764dc.3b0cac"],["f57f811c.4641d8","d8c5c8aa.893d8"]]}]

```

The output says Sunset is 19:54 today. Which is pretty close to what other sources say.  
And I'm guessing those times are for the timezone, not my exact longitude.  
Which is what I am guessing `Bigtimer` is giving me.

Anyway, `Cron_Plus` has become of interest because it has some features I think are nicer than `Bigtimer`'s.

So, I set things up for SUNSET. Enter Lat/Long via its map.  
Sunset: 18:35

```auto
[{"id":"a3f53c75.bc923","type":"cronplus","z":"b25fd092.bcc758","name":"Day Start / End","outputField":"payload","timeZone":"","persistDynamic":true,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"Dawn","topic":"schedule1","payloadType":"str","payload":"Dawn","expressionType":"solar","expression":"0 * * * * * *","location":"33.88094790268725 -208.87731456743495","offset":"0","solarType":"selected","solarEvents":"sunrise"},{"name":"Dusk","topic":"schedule2","payloadType":"str","payload":"Dusk","expressionType":"solar","expression":"0 * * * * * *","location":"33.88094790268725 -208.87731456743495","offset":"0","solarType":"selected","solarEvents":"sunset"}],"x":2010,"y":510,"wires":[["a9dfb0d5.092938"]]}]

```

That's about 90 minutes difference.

Could someone explain what I am missing?  
Thanks.

# Update:

This is interesting:

How I _scrolled_ to where I am I _went the wrong way_ and the LONG was -208.... something.  
(Which can't exist)

I scrolled the right way and got it to 151.

Now when deployed the sunset time is 19:55 which is more acceptable.

New node/code

```auto
[{"id":"a3f53c75.bc923","type":"cronplus","z":"b25fd092.bcc758","name":"Day Start / End","outputField":"payload","timeZone":"","persistDynamic":true,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"Dawn","topic":"schedule1","payloadType":"str","payload":"Dawn","expressionType":"solar","expression":"0 * * * * * *","location":"-33.88050254877312 151.12279272092562","offset":"0","solarType":"selected","solarEvents":"sunrise"},{"name":"Dusk","topic":"schedule2","payloadType":"str","payload":"Dusk","expressionType":"solar","expression":"0 * * * * * *","location":"-33.88050254877312 151.12279272092562","offset":"0","solarType":"selected","solarEvents":"sunset"}],"x":2010,"y":510,"wires":[["a9dfb0d5.092938"]]}]

```

# IS THIS A BUG?

---

<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:** [9 February 2021 21:47 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705/2 "2021-02-09T21:47:37Z")

</div>

Are you sure that you are comparing like for like?  
Should Cron+ be set to 'Astronomical Dusk' and not 'Sunset'. That would give almost the same time as Bigtimer, give or take a few minutes.

---

<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:** [9 February 2021 21:48 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705/3 "2021-02-09T21:48:46Z")

</div>

I posted the two versions of the node as I have it set in the flow.

Just to keep things declared.

Did you see/notice that the LONG value was -208 and when I changed it to 151 it now shows the correct time?

Could you please test this on your machine.

Thanks.

Hang on!

Caught it!

 ![Screenshot from 2021-02-10 08-55-17](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/9/c91ef558cb4c7b2b24cd6b21ff3fb7e7bcf9960f.png)

Code:

```auto
[{"id":"8e408a43.98b6f","type":"cronplus","z":"b25fd092.bcc758","name":"Day Start correct LONG value","outputField":"payload","timeZone":"","persistDynamic":true,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"Dawn","topic":"schedule1","payloadType":"str","payload":"Dawn","expressionType":"solar","expression":"0 * * * * * *","location":"-33.88050254877312 151.12279272092562","offset":"","solarType":"selected","solarEvents":"sunset"}],"x":2050,"y":950,"wires":[[]]},{"id":"ced55acd.52e64","type":"cronplus","z":"b25fd092.bcc758","name":"Day Start / End","outputField":"payload","timeZone":"","persistDynamic":true,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"Dawn","topic":"schedule1","payloadType":"str","payload":"Dawn","expressionType":"solar","expression":"0 * * * * * *","location":"33.88094790268725 -208.87731456743495","offset":"0","solarType":"selected","solarEvents":"sunrise"},{"name":"Dusk","topic":"schedule2","payloadType":"str","payload":"Dusk","expressionType":"solar","expression":"0 * * * * * *","location":"33.88094790268725 -208.87731456743495","offset":"0","solarType":"selected","solarEvents":"sunset"}],"x":2030,"y":1020,"wires":[[]]}]

```

---

<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:** [9 February 2021 21:57 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705/4 "2021-02-09T21:57:52Z")

</div>

So was the problem that you selected the wrong lat/lon coordinates.

---

<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:** [9 February 2021 21:59 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705/5 "2021-02-09T21:59:11Z")

</div>

Well, that's a good question.

I _scrolled_ the globe ..... left rather than right to get where I am.

I got a longitude of -208.

The _program_ (node?) accepted it.

That gave/gives me the wrong time.

Do you get the same results if you import the code I posted?

---

<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:** [9 February 2021 22:17 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705/6 "2021-02-09T22:17:54Z")

</div>

I didn't enter the wrong values.

The _Map_ gave me the wrong values.

---

<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:** [9 February 2021 22:28 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705/7 "2021-02-09T22:28:50Z")

</div>

> [@Trying\_to\_learn](#):
>
> Do you get the same results if you import the code I posted?

Yes, the two different longitudes gave me different times. I deleted them when you said 'Caught it', so can't tell you what they were.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [9 February 2021 22:33 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705/8 "2021-02-09T22:33:20Z")

</div>

Yes, the longitude isn't properly constrained:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/d/6d4de0f4979c01fbc7ce9e8b6058e109e887420e.png)

It should reset at 360 surely? Possibly at 359.99?

Keep going East ...

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/c/8c07daaaf8232bdf271eef513f5693a59c494188.png)

🤣

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/d/4dabdacb5eb26710c6d58d63a27818c94b7f5f91.png)

Also hope that you don't want to select the north pole or the south pole

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd64e76ed6088bdc98d2aa8b4dff624614bd6362.png)

Yes, its true, I'm running out of good YouTube video to watch!!

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/5/1517c9662e9d63276d6b18585df34774e46da695.png)

---

<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:** [9 February 2021 22:44 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705/9 "2021-02-09T22:44:44Z")

</div>

Wouldn't it be 180 not 360? (+/- 180)

Just saying.

@Paul-Reed  
The nodes have the LONGITUDE in them.

`Caught it` was more that I had caught the error as I had erroneously said the problem had stopped - when it hadn't.

And I then showed it.

Sorry for the confusion.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [9 February 2021 23:02 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705/10 "2021-02-09T23:02:20Z")

</div>

> [@Trying\_to\_learn](#):
>
> Wouldn't it be 180 not 360? (+/- 180)

Haha, a long time since my geography lessons obviously! 😬

Or maybe its because the world really IS flat?! 🙈 🙉 🙊 🗺

---

<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:** [10 February 2021 00:00 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705/11 "2021-02-10T00:00:48Z")

</div>

I guess I've never scrolled far enough east or west (or noticed). Suprised the map component allows this. I'll check it out some time this week.

---

<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:** [10 February 2021 00:24 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705/12 "2021-02-10T00:24:39Z")

</div>

Thanks.

It isn't I wanted to find a bug, but just my usual _Playing outside the box_ methodology found it.

---

<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:** [10 February 2021 19:55 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705/13 "2021-02-10T19:55:09Z")

</div>

> [@Steve-Mcl](#):
>
> I'll check it out some time this week

Let's not forget that Andrew is in Australia, so the world will rotate in a different direction to us in the northern hemisphere...

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [10 February 2021 21:09 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705/14 "2021-02-10T21:09:02Z")

</div>

I've been there, and it is true!

---

<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:** [10 February 2021 21:54 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705/15 "2021-02-10T21:54:47Z")

</div>

The hardest part to get used to is hanging on with your arms so you don't fall.

(We are upside down here.)

😉

---

<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:** [24 February 2021 21:55 UTC](https://discourse.nodered.org/t/cron-plus-vs-bigtimer-times-given-are-different/40705/16 "2021-02-24T21:55:47Z")

</div>

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