New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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.

Contributor

KODeKarnage commented Feb 28, 2016

Thanks!

@jgriffiths

This comment has been minimized.

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.

Contributor

samnazarko commented Feb 28, 2016

Cheers

@vStone

This comment has been minimized.

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.

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