1. sdf.setTimeZone(TimeZone.getTimeZone("GMT+08:00"));  //加上这行代码就哦了 
  2. return sdf.format(value); 


困扰了整个项目周期的问题。在项目即将完工的时候搞定了。

加上 sdf.setTimeZone 就万事大吉了。。。 不会受系统时区设置的影响了

 

转自:http://blog.csdn.net/id19870510/article/details/7024316

相关文章:

  • 2021-09-26
  • 2022-01-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-23
  • 2021-11-07
  • 2022-12-23
  • 2021-06-26
  • 2021-11-17
  • 2022-12-23
相关资源
相似解决方案