Sergio_Istea

hora internaciona

Jul 3rd, 2025 (edited)
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="es">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Imágenes Docker y Hora UTC</title>
  6. <style>
  7. body {
  8. background-color: #222;
  9. color: #eee;
  10. font-family: Arial, sans-serif;
  11. text-align: center;
  12. padding: 50px;
  13. }
  14. h1 {
  15. color: #00ffff;
  16. font-size: 3em;
  17. }
  18. p, div {
  19. color: #ffcc00;
  20. font-size: 1.5em;
  21. max-width: 600px;
  22. margin: 20px auto;
  23. }
  24. .highlight {
  25. color: #ff3366;
  26. font-weight: bold;
  27. }
  28. .time {
  29. margin: 10px 0;
  30. font-size: 1.2em;
  31. }
  32. </style>
  33. </head>
  34. <body>
  35. <h1>¿Qué es una imagen Docker?</h1>
  36. <p>
  37. Una <span class="highlight">imagen Docker</span> es una plantilla que contiene todo lo necesario para ejecutar una aplicación:
  38. su sistema de archivos, dependencias y configuraciones. Desde esta imagen se crean los contenedores,
  39. que son instancias ligeras y portables listas para funcionar.
  40. </p>
  41.  
  42. <h1>Hora en distintas zonas</h1>
  43. <div class="time" id="utc"></div>
  44. <div class="time" id="mexico"></div>
  45. <div class="time" id="saopaulo"></div>
  46. <div class="time" id="buenosaires"></div>
  47.  
  48. <script>
  49. function actualizarHora() {
  50. const ahora = new Date();
  51. document.getElementById('utc').innerText = 'Hora UTC: ' + ahora.toUTCString();
  52.  
  53. const mexico = new Date(ahora.toLocaleString("en-US", {timeZone: "America/Mexico_City"}));
  54. document.getElementById('mexico').innerText = 'Ciudad de México: ' + mexico.toLocaleTimeString();
  55.  
  56. const saopaulo = new Date(ahora.toLocaleString("en-US", {timeZone: "America/Sao_Paulo"}));
  57. document.getElementById('saopaulo').innerText = 'São Paulo: ' + saopaulo.toLocaleTimeString();
  58.  
  59. const buenosaires = new Date(ahora.toLocaleString("en-US", {timeZone: "America/Argentina/Buenos_Aires"}));
  60. document.getElementById('buenosaires').innerText = 'Buenos Aires: ' + buenosaires.toLocaleTimeString();
  61. }
  62.  
  63. actualizarHora();
  64. setInterval(actualizarHora, 1000);
  65. </script>
  66. </body>
  67. </html>
  68.  
Advertisement
Add Comment
Please, Sign In to add comment