fork 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.SimpleDateFormat;
  7.  
  8. /* Name of the class has to be "Main" only if the class is public. */
  9. class Ideone
  10. {
  11. public static void main (String[] args) throws java.lang.Exception
  12. {
  13. String temptime= "1715UTC";
  14. SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HHmm");
  15. simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
  16. Date myDate = simpleDateFormat.parse(temptime);
  17. System.out.println( myDate.toString() );
  18. }
  19. }
Success #stdin #stdout 0.06s 712192KB
stdin
Standard input is empty
stdout
Thu Jan 01 17:15:00 GMT 1970