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

Library thinks 12pm is 12am #10

Closed
Nek-12 opened this issue Dec 10, 2022 · 0 comments
Closed

Library thinks 12pm is 12am #10

Nek-12 opened this issue Dec 10, 2022 · 0 comments

Comments

@Nek-12
Copy link

Nek-12 commented Dec 10, 2022

When the time selected by the user is exactly 12pm (and any minute), the library changes that time to 12am.

The culprit is this function:

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
internal fun isAm(currentTime: LocalTime): Boolean {
    return currentTime.hour <= 12 // should be <
}

Because 12 hours is already PM, not AM

maxkeppeler added a commit that referenced this issue Dec 10, 2022
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

2 participants