Page 1 of 2

Leap Year / Feb 29 = Mar 1

PostPosted: Thu Mar 01, 2018 1:19 pm
by CraigM
I woke up this morning to discover that Indigo doesn't seem to respect Feb 29 as a February date.

All of my February schedules are set from Feb 1 to Feb 29 and they all show 'next execution' as March 1

This is obviously a problem since all of the real March schedules are now also running and conflicting with all the Feb schedules.

My HVAC and Irrigation are in a power struggle as to which schedules to run or they run both.

Re: Leap Year / Feb 29 = Mar 1

PostPosted: Thu Mar 01, 2018 1:26 pm
by kw123
Did not know we have a leap year this year.
Today is March 1. ??


Sent from my iPhone using Tapatalk

Re: Leap Year / Feb 29 = Mar 1

PostPosted: Thu Mar 01, 2018 1:36 pm
by roussell
Yeh, March 1st here as well. Do you by chance have the wrong year as your date, or are we misunderstanding your problem? I seem to remember Indigo handling my leap-year-day schedules without issue.


Sent from my iPhone using Tapatalk

Re: Leap Year / Feb 29 = Mar 1

PostPosted: Thu Mar 01, 2018 2:11 pm
by CraigM
Obvious confusion

If you set your Feb schedules to:
start FEB 1 every year
end FEB 29 every year

this should cover you for normal 28 day years and leap years with 29 days

Today is March 1 and all my FEB schedules ran AND my March schedules ran

Even the UI displays 'next execution' as March 1 for the FEB schedules

Since there wasn't a FEB 29, shouldn't Indigo have skipped over the date? Why is Indigo seeing a setting of FEB 29 as a March event?

Re: Leap Year / Feb 29 = Mar 1

PostPosted: Thu Mar 01, 2018 2:23 pm
by kw123
You are looking for a trigger for last day in the month?


Sent from my iPhone using Tapatalk

Re: Leap Year / Feb 29 = Mar 1

PostPosted: Thu Mar 01, 2018 3:03 pm
by CraigM
Not sure why the misunderstanding?

Test for yourself:

Create a schedule that-
start FEB 1 every year
end FEB 29 every year

it will run today, today is NOT a FEB date

Not only is Indigo treating FEB 29 as a valid date on years when there is no FEB 29, but the date that it assigns is Mar 1.

So on days like today ALL of your FEB and MAR schedules will BOTH run.

Re: Leap Year / Feb 29 = Mar 1

PostPosted: Thu Mar 01, 2018 3:37 pm
by Different Computers
makes me wonder what happens if you set something to run on Feb 30. Or Feb 35, for that matter!

Re: Leap Year / Feb 29 = Mar 1

PostPosted: Thu Mar 01, 2018 3:47 pm
by CraigM
Different Computers wrote:
makes me wonder what happens if you set something to run on Feb 30. Or Feb 35, for that matter!

The UI won't let you. Feb 30 & 31 are grayed out

Re: Leap Year / Feb 29 = Mar 1

PostPosted: Thu Mar 01, 2018 4:09 pm
by jay (support)
We make the assumption that the user wants the schedule to run regardless of leap year, so we move it to the next day.

If you want a schedule that only runs specifically on Feb 29th every 4 years, I'm afraid you'll need to take a different approach...

[EDIT] - this is a guess, I didn't actually dig into the code but I'm pretty sure this was intended behavior (Matt can clarify if I'm wrong).

Re: Leap Year / Feb 29 = Mar 1

PostPosted: Thu Mar 01, 2018 5:10 pm
by CraigM
jay (support) wrote:
We make the assumption that the user wants the schedule to run regardless of leap year, so we move it to the next day.

Exactly, I expected it to run regardless of leap year. But when there is no February 29, I would assume it would skip past that date. Why would it run the next day, which is March? That logic escapes me. What is the point of having monthly parameters?

Example of what happened today:

6:00am Turn on IRRIGATION Zone 2 for 10 min [Feb]
6:00am Turn on IRRIGATION Zone 1 for 28 min [March]

8:00am Turn on HEAT and set to 72º [Feb]
8:00am Turn on COOL and set to 80º [March]

Then when you factor in the Lighting, Windows, and every other February schedule getting multiple conflicting commands.



jay (support) wrote:
If you want a schedule that only runs specifically on Feb 29th every 4 years, I'm afraid you'll need to take a different approach...

I'm not looking for anything unusual or special solution pertaining to leap year. Just expected a February schedule to run in February.

Re: Leap Year / Feb 29 = Mar 1

PostPosted: Thu Mar 01, 2018 5:59 pm
by FlyingDiver
Personally, I agree with the OP that running a Feb schedule in March seems like a bug. On the other hand, I can't grasp the logic of doing those kind of scheduled things based on the calendar month. Season, yes. School year/holidays, sure. But just the month? To each their own. ;)

Re: Leap Year / Feb 29 = Mar 1

PostPosted: Fri Mar 02, 2018 9:29 am
by jay (support)
Take a screenshot of how you have your schedule defined and attach it to a reply.

Re: Leap Year / Feb 29 = Mar 1

PostPosted: Fri Mar 02, 2018 9:30 am
by CraigM
FlyingDiver wrote:
Personally, I agree with the OP that running a Feb schedule in March seems like a bug. On the other hand, I can't grasp the logic of doing those kind of scheduled things based on the calendar month. Season, yes. School year/holidays, sure. But just the month? To each their own. ;)

I live in the desert [32º winter low, 120º summer high] where we have enough changes to temp [HVAC], water needs [irrigation], sun position [window shades & lighting] to warrant monthly changes. Seasonal would never cut-it

Re: Leap Year / Feb 29 = Mar 1

PostPosted: Fri Mar 02, 2018 9:42 am
by CraigM
jay (support) wrote:
Take a screenshot of how you have your schedule defined and attach it to a reply.


Feb.png
Feb.png (64.6 KiB) Viewed 934 times
Mar.png
Mar.png (64.6 KiB) Viewed 934 times

Re: Leap Year / Feb 29 = Mar 1

PostPosted: Fri Mar 02, 2018 1:27 pm
by jay (support)
Change your February schedule to remove the end date. Then, add a condition: If current date is between January 31st and March 1st

That condition will ensure that the schedule only executes it's actions in February (between is not inclusive). And it should cover any date in February even if it's leap day.