gzu-liyujiang / gzu-liyujiang/AndroidPicker

TimePicker 12小时制转换有问题

Open
#284 8 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
6.8k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

按正确的时间理解,应该是 12:00 AM = 凌晨0点 =24点, 12:00 PM = 中午12点 (因为11:59 AM 还是AM,到12才跳PM)
在测试中,设置TimePicker 的**TimeMode** 为 _TimeMode.HOUR_12_NO_SECOND_
当setDefaultValue时候
TimeEntity.target(0, 0, 0) -> wheel显示 1:0 AM (正常应该是显示12:00 AM)
TimeEntity.target(12, 0, 0) -> wheel显示 12:00 AM (正常应该是显示12:00 PM)
TimeEntity.target(24, 0, 0) -> wheel显示 12:00 PM (正常应该是显示12:00 AM) //但其实这个应该视为不合法,因为24点其实等于0点

可能描述有点复杂,或者我理解有问题,望作者回复

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with TimePicker in TimeMode.HOUR_12_NO_SECOND_ using TimeEntity.target(0, 0, 0), target(12, 0, 0), and target(24, 0, 0). Trace the default-value conversion and wheel display for AM/PM. Done means midnight, noon, and the invalid 24:00 case are handled consistently with the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.