Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Fix for the occasional 1-day-ahead bug when setting reminders with a date-less time statement (Ex. 11pm) #15

Merged
merged 1 commit into from
Feb 22, 2020

Conversation

Ricimon
Copy link
Contributor

@Ricimon Ricimon commented Feb 22, 2020

See scrapinghub/dateparser#403 for the underlying issue

@JellyWX JellyWX merged commit 06b97f5 into reminder-bot:master Feb 22, 2020
@Ricimon Ricimon deleted the day-skip-fix branch February 22, 2020 21:49
@JellyWX
Copy link
Contributor

JellyWX commented Feb 23, 2020

Another issue has popped up now, again internal to the library trying to compare a naive and aware dt

@Ricimon
Copy link
Contributor Author

Ricimon commented Feb 23, 2020

Ah sorry, this appears to fix the issue:
Change line 432 from this:

'RELATIVE_BASE': datetime.now(pytz.timezone(server.timezone)),

to this:

'RELATIVE_BASE': datetime.now(pytz.timezone(server.timezone)).replace(tzinfo=None),

Since the library can't be easily modified, this is where I got this solution:
https://stackoverflow.com/questions/796008/cant-subtract-offset-naive-and-offset-aware-datetimes

@JellyWX
Copy link
Contributor

JellyWX commented Feb 23, 2020 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants