Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

207
Vistas
Display EST time clock in html - not computer time

I want to add a clock to my website that displays Eastern time only. Currently I am not on EST time zone, and the clock is displaying my local time. I was unable to find a reference that does that. Some were discussing connecting to php / ajax sever time..etc which I am unfamiliar with.

Below are the html and js codes I am using.

function showTime(){
    var date = new Date();
    var h = date.getHours();
    var m = date.getMinutes();
 
    h = (h < 10) ? "0" + h : h;
    m = (m < 10) ? "0" + m : m;

    var time = h + ":" + m;
    document.getElementById("MyClockDisplay").innerText = time;
    document.getElementById("MyClockDisplay").innerContent = time;

    setTimeout(showTime, 1000);
}
    
showTime();
<body>
   <div id="MyClockDisplay"></div>
   <script src="./src/clock.js"></script>
</body>

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda