Java date format - GMT +04:00 [duplicate]
问题 This question already has answers here : java parsing string to date (2 answers) how to parse output of new Date().toString() (4 answers) Closed 2 days ago . I have to parse the following date Fri Sep 30 18:31:00 GMT+04:00 2016 and it is not working with the following pattern: new SimpleDateFormat("EEE MMM dd HH:mm:ss z YYYY", Locale.ENGLISH); I get the following date as output: Fri Jan 01 18:31:00 GMT+04:00 2016. Could you please tell me what I am doing wrong? 回答1: It should be lower case "y