Guest User

Untitled

a guest
Aug 22nd, 2019
60
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package mx.hash.ejemplontp;
  7.  
  8. import java.util.Date;
  9. import java.util.logging.Level;
  10. import java.util.logging.Logger;
  11.  
  12. /**
  13. *
  14. * @author david
  15. */
  16. public class App {
  17. static private final Logger LOGGER = Logger.getLogger("mx.hash.ejemplontp.App");
  18.  
  19. static public void main(String[] args){
  20. NTPService servicioNTP = new NTPService();
  21. LOGGER.log(Level.INFO, "Obteniendo fecha desde el servidor NTP");
  22.  
  23. Date fecha = servicioNTP.getNTPDate();
  24.  
  25. System.out.println("");
  26. System.out.println("");
  27. System.out.println("Fecha-Hora NTP: " + fecha);
  28. }
  29. }
RAW Paste Data