fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.Date;
  4. import java.util.Locale;
  5. import java.text.SimpleDateFormat;
  6.  
  7. class Ideone
  8. {
  9. public static void main (String[] args) throws java.lang.Exception
  10. {
  11. long timeOfData = 1545151800;
  12. long timeOfDataL = timeOfData*1000L;
  13. String humanTimeOfData = new SimpleDateFormat("dd/MM/yyyy", Locale.US).format(new Date(timeOfDataL));
  14. System.out.println(humanTimeOfData);
  15. }
  16. }
Success #stdin #stdout 0.07s 2184192KB
stdin
Standard input is empty
stdout
18/12/2018