Don't throw an error updating on Feb 29 #282

Merged
merged 1 commit into from Feb 28, 2016

Conversation

Projects
None yet
4 participants
@jgriffiths
Contributor

jgriffiths commented Feb 28, 2016

Initial date setting in the simple scheduler fails on Feb 29 because
it doesn't use a leap year. Feb 29 is only valid on leap years so use
one to stop a datetime exception and subsequent user error message about
a failed update.

Don't throw an error updating on Feb 29
Initial date setting in the simple scheduler fails on Feb 29 because
it doesn't use a leap year. Feb 29 is only valid on leap years so use
one to stop a datetime exception and subsequent user error message about
a failed update.

KODeKarnage added a commit that referenced this pull request Feb 28, 2016

Merge pull request #282 from jgriffiths/feb_29_fix
Don't throw an error updating on Feb 29

@KODeKarnage KODeKarnage merged commit 4496827 into osmc:master Feb 28, 2016

@KODeKarnage

This comment has been minimized.

Show comment
Hide comment
@KODeKarnage

KODeKarnage Feb 28, 2016

Contributor

Thanks!

Contributor

KODeKarnage commented Feb 28, 2016

Thanks!

@jgriffiths

This comment has been minimized.

Show comment
Hide comment
@jgriffiths

jgriffiths Feb 28, 2016

Contributor

Thanks for this project, its awesome!

Contributor

jgriffiths commented Feb 28, 2016

Thanks for this project, its awesome!

@jgriffiths jgriffiths deleted the jgriffiths:feb_29_fix branch Feb 28, 2016

@samnazarko

This comment has been minimized.

Show comment
Hide comment
@samnazarko

samnazarko Feb 28, 2016

Contributor

Cheers

Contributor

samnazarko commented Feb 28, 2016

Cheers

@vStone

This comment has been minimized.

Show comment
Hide comment
@vStone

vStone Feb 29, 2016

Should the correct fix not be something like datetime.datetime.now().year + 200

vStone commented on 75a6648 Feb 29, 2016

Should the correct fix not be something like datetime.datetime.now().year + 200

This comment has been minimized.

Show comment
Hide comment
@jgriffiths

jgriffiths Mar 1, 2016

Contributor

Adding 200 isn't any more correct AFAICS, as in some cases year n/n + 200 are not both leap years. It may fail later (year 2400 vs 2224) but I doubt there will be any users to note the extra 176 years of bug free leap year updates :-)

Contributor

jgriffiths replied Mar 1, 2016

Adding 200 isn't any more correct AFAICS, as in some cases year n/n + 200 are not both leap years. It may fail later (year 2400 vs 2224) but I doubt there will be any users to note the extra 176 years of bug free leap year updates :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment