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

Reminder shows up at 8 AM instead of 8 PM #198

Closed
kartikg3 opened this issue Nov 27, 2021 · 6 comments
Closed

Reminder shows up at 8 AM instead of 8 PM #198

kartikg3 opened this issue Nov 27, 2021 · 6 comments

Comments

@kartikg3
Copy link

Same issue as #171

I now have the latest Pixel 6 (Android version 12). Transferred over the data from my LG G6 into a new installation of the app on the Pixel 6, and I still see this issue. I get the reminder at 8 AM in the morning, even if the app shows that it has been set for 8 PM. I am in Canada (EDT) Eastern timezone, if that helps troubleshooting this.

@jonasv42
Copy link

Just tested this on Android version 13 and it worked as expected.

@jorpaspr
Copy link

This is reproducible when setting the main language to English (Canada). It does not happen with English (United States) or English (United Kingdom).

@jorpaspr
Copy link

jorpaspr commented Jul 23, 2023

Works as expected:

DateFormat twelveHourFormat = new SimpleDateFormat("h:mm a", Locale.US);
twelveHourFormat.parse("8:00 PM");

Throws ParseException, fallbacks to 24h format:

DateFormat twelveHourFormat = new SimpleDateFormat("h:mm a", Locale.CANADA);
twelveHourFormat.parse("8:00 PM");

@slavick
Copy link
Member

slavick commented Jul 23, 2023

@jorpaspr Thank you for the info! Everything makes sense now! What a strange issue and compounded by the fact that I cannot get my physical test device nor my emulator to switch to the Canada locale. I've set the timezone manually in both to Canada and Eastern time zone, but the locale still comes back as en_US so I have not been able to test the parse exception directly.

I've created a branch for the fix here: #233

@kartikg3 @jorpaspr Would either of you be willing to test an apk with the above fix to confirm that it works on an actual device?

@jorpaspr
Copy link

@slavick This works. I've left a suggestion on the PR as I think it can be improved.

@slavick slavick mentioned this issue Aug 13, 2023
@slavick
Copy link
Member

slavick commented Oct 7, 2023

@slavick slavick closed this as completed Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants