Skip to content
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
Merged

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

merged 1 commit into from Feb 28, 2016

Conversation

@jgriffiths
Copy link
Contributor

@jgriffiths 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.

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
Don't throw an error updating on Feb 29
@KODeKarnage KODeKarnage merged commit 4496827 into osmc:master Feb 28, 2016
@KODeKarnage
Copy link
Contributor

@KODeKarnage KODeKarnage commented Feb 28, 2016

Thanks!

@jgriffiths
Copy link
Contributor Author

@jgriffiths jgriffiths commented Feb 28, 2016

Thanks for this project, its awesome!

@jgriffiths jgriffiths deleted the jgriffiths:feb_29_fix branch Feb 28, 2016
@samnazarko
Copy link
Contributor

@samnazarko samnazarko commented Feb 28, 2016

Cheers

@vStone

This comment has been minimized.

Copy link

@vStone 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.

Copy link
Contributor Author

@jgriffiths 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants