Parsing a String with a GMT timezone to Date using SimpleDateFormat

后端 未结 1 1181
南笙
南笙 2020-12-20 05:12

I\'m having problem parsing the Date from an input string that is of the following format:

String input = \"Fri Jul 15 12:00:00 GMT+300 2011\";
String dateFo         


        
相关标签:
1条回答
  • 2020-12-20 05:21

    The problem was that GMT+300 isn't valid GMT string according to the Java Timezone specification.

    Solution: Manipulating the timezone portion of input string. GMT+300 ==> GMT+3:00

    0 讨论(0)
提交回复
热议问题