setCurrentTimeMillis设置的年份不能超过2200


Calendar c = Calendar.getInstance();
 c.set(2233, 1, 2, 3, 4);
boolean b = SystemClock.setCurrentTimeMillis(c.getTimeInMillis()); // b == false


apk拥有系统签名,为什么setCurrentTimeMillis年份最大不能超过2200?看了下源代码

if (when / 1000 < Integer.MAX_VALUE) {
            SystemClock.setCurrentTimeMillis(when);
        }
/* log:
08-02 03:04:23.271: W/SystemClock(2005): time going backwards: prev 1884443673247396938(ioctl) vs now -526088270617409983(ioctl), tid=2005
*/

发现超过2200的话会溢出,可我看Settings里面也是这样设置的啊,他为什么没问题呢?还有说我还有哪没注意到?有哪位知道什么原因以及怎么改么?

你可能感兴趣的:(setCurrentTimeMillis设置的年份不能超过2200)