In Java, How to parse "Wed, 05 Jun 2013 00:48:12 GMT" into a Date object, then print the date object out in the same format.
I have tried this:
String dStr= "Wed, 05 Jun 2013 00:48:12 GMT";
SimpleDateFormat ft = new SimpleDateFormat ("E, dd MMM yyyy hh:mm:ss ZZZ");
Date t = ft.parse(dStr);
System.out.println(t);
System.out.println(ft.format(t));
The result is
Wed Jun 05 10:48:12 EST 2013
Wed, 05 Jun 2013 10:48:12 +1000
Thanks in advance:
System.out.println("Wed, 05 Jun 2013 00:48:12 GMT");