Day/Night Block

Post Reply
User avatar
Ken Good
Advisor
Advisor
Posts: 62
Joined: Thu Dec 28, 2017 4:10 am
Location: Tyler, Texas
Station model: Davis Vantage Pro 2 Plus
Software: Meteobridge
Contact:

Day/Night Block

Post by Ken Good » Wed Jan 17, 2018 5:43 am

The day/night block seems to be experiencing an error in counting down until sun rise. Here is what it showed at approximately 11:35 pm:

Image

It should be saying that there was a little over 7 hours until sunrise. I checked the counter and every time I refreshed it the number was larger. So it appears to be counting up and not down.

Thanks in advance.

Ken W. Good
http://www.BullardWeather.com
Last edited by Ken Good on Wed Jan 17, 2018 6:10 am, edited 1 time in total.
Image

User avatar
Ken Good
Advisor
Advisor
Posts: 62
Joined: Thu Dec 28, 2017 4:10 am
Location: Tyler, Texas
Station model: Davis Vantage Pro 2 Plus
Software: Meteobridge
Contact:

Re: Day/Night Block

Post by Ken Good » Wed Jan 17, 2018 6:01 am

At midnight the block resets and begins counting down correctly. So this is a problem that exists from sunset until midnight.

Ken
Last edited by Ken Good on Wed Jan 17, 2018 6:10 am, edited 1 time in total.
Image

User avatar
Ken Good
Advisor
Advisor
Posts: 62
Joined: Thu Dec 28, 2017 4:10 am
Location: Tyler, Texas
Station model: Davis Vantage Pro 2 Plus
Software: Meteobridge
Contact:

Re: Day/Night Block

Post by Ken Good » Wed Jan 17, 2018 6:06 am

This is my guess. It appears that until midnight, the block is counting up from something, but what is not clear. I bet it is counting up from the last sun rise and then at midnight it begins counting down again to the next sun rise. You see this with the countdown block too. Once the deadline passes, the block starts counting up instead of stopping.

Ken
Image

User avatar
Ken Good
Advisor
Advisor
Posts: 62
Joined: Thu Dec 28, 2017 4:10 am
Location: Tyler, Texas
Station model: Davis Vantage Pro 2 Plus
Software: Meteobridge
Contact:

Re: Day/Night Block

Post by Ken Good » Thu Jan 18, 2018 12:48 am

After sunset today, I reviewed this block again and I confirmed that after sunset, the counter begins counting forward from the last sunrise. It continues to count forward until midnight. Then it magically changes to counting down.

I looked at the coding and I was shocked, shocked to learn that it involved math (this is a joke). But seriously, I do not do math well. It just came out as Greek to me and I did not have a button to press to automatically translate it for me. Ha!

I will have to leave it to the vast multitude of people who are much smarter than myself.

Ken
Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Day/Night Block

Post by Jachym » Sun Jan 28, 2018 9:32 pm

I suspect the problem is in TZ detection, it works fine for me. I think it incorrectly detects the date. Its not the math, its the TZ functions, this is what usually causes all time-related problems (like in the interactiveGraph).

Post Reply