Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

204
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!