1

这是由于 android 上的 jdk 版本不同。

  String string = "Tue Oct 16 00:00:55 IST 2012";
  Date date = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy").parse(string);

也试过

String string = "Tue Oct 16 00:00:55 IST 2012";
Date date = new SimpleDateFormat("EEE MMM dd HH:mm:ss 'UTC' yyyy").parse(string);

在 SimpleDateFormat 构造函数中添加 Locale 无效。

我已经搜索并得到了这个,但找不到任何解决方法。

有什么解决方法吗?

4

0 回答 0