fork download
  1. import java.text.ParseException;
  2. import java.text.SimpleDateFormat;
  3. import java.util.Date;
  4. import java.util.Locale;
  5.  
  6. class Main {
  7. public static void main(String[] args) throws ParseException {
  8. SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd yyyy HH:mm:ss 'GMT'Z", Locale.ENGLISH);
  9. String created = "Thu Feb 04 2016 09:32:14 GMT+0100";
  10. Date date = sdf.parse(created);
  11. System.out.println(date);
  12. }
  13. }
Success #stdin #stdout 0.23s 54648KB
stdin
Standard input is empty
stdout
Thu Feb 04 08:32:14 GMT 2016