Winmming

Results 2 issues of Winmming

## 描述 Bug 1.在中文环境下,使用TimeUtils.millis2String(long millis, @NonNull final String pattern)方法,pattern传入:h:mm a,获取到的时间能正常显示,如:8:00上午 2.切换系统语言为其他语言,此时重复上面的步骤,获取到的时间显示不对,在其他语言环境下,仍显示:8:00上午,显示错误 - AndroidUtilCode 的版本:utilscodex:1.31.1 - 出现 Bug 的设备型号:华为畅享50 - 设备的 Android 版本:Android 10 查看源码,TimeUtils类里的SDF_THREAD_LOCAL里面已经缓存了SimpleDateFormat,切换语言时,因为h:mm a使用过,缓存在SDF_THREAD_LOCAL,不会重新添加,但此时的simpleDateFormat是在中文环境创建的,导致出来的时间一直是中文,切换了语言也不会变……

bug

wheelLayout.setTimeMode(TimeMode.HOUR_12_NO_SECOND); wheelLayout.setRange(TimeEntity.target(8, 0, 0), TimeEntity.target(16, 0, 0)); 代码这样设置后,按理说限制范围应该是08:00am - 04:00pm,但是am跟pm的开始日期跟结束日期都是一样的8:00-12:55