SimpleDateFormat throws ParseException With Error Offset 0

前端 未结 4 1165
情书的邮戳
情书的邮戳 2021-01-23 04:19

What\'s wrong with the following code? It throws a ParseException with error offset 0.

final DateFormat df = new SimpleDateFormat(\"EEE MMM dd HH:mm:ss yyyy\");
         


        
4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-23 05:04

    Is your locale "EN"? If you use English names for the date, make sure you are using that locale

提交回复
热议问题