解决方法:
设置北京时间的时区,消除时间差。
TimeZone timeZone = TimeZone.getTimeZone("GMT+8");
TimeZone.setDefault(timeZone);