fork(2) download
  1. import java.text.ParseException;
  2. import java.text.SimpleDateFormat;
  3. import java.util.Locale;
  4.  
  5. /* The class name doesn't have to be Main, as long as the class is not public. */
  6. class Main
  7. {
  8. public static void main (String[] args) throws java.lang.Exception
  9. {
  10. System.out.println(new SimpleDateFormat("MMM dd HH:mm:ss YYYY", Locale.ENGLISH).parse("Sep 26 19:00:32 2012"));
  11. }
  12. }
Success #stdin #stdout 0.1s 217408KB
stdin
Standard input is empty
stdout
Sun Jan 01 19:00:32 GMT 2012