fork(19) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6. import java.text.DateFormat;
  7. import java.text.SimpleDateFormat;
  8.  
  9. /* Name of the class has to be "Main" only if the class is public. */
  10. class Ideone
  11. {
  12. public static void main (String[] args) throws java.lang.Exception
  13. {
  14. DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSX");
  15. String date = "2014-12-03T10:05:59.5646+08:00";
  16. System.out.println(format.parse(date));
  17. }
  18. }
Success #stdin #stdout 0.18s 321472KB
stdin
Standard input is empty
stdout
Wed Dec 03 02:06:04 GMT 2014