World Capital Clocks

Track the global pulse. This script calculates and displays the current time for various timezones relative to UTC/GMT.

New York
--:--
London
--:--
Tokyo
--:--

Copy the Script

<script>
function calcTime(offset) {
    var d = new Date();
    var utc = d.getTime() + (d.getTimezoneOffset() * 60000);
    var nd = new Date(utc + (3600000 * offset));
    return nd.toLocaleTimeString();
}

function updateWorld() {
    document.getElementById("ny").innerHTML = calcTime(-5); // EST
    document.getElementById("london").innerHTML = calcTime(0); // GMT
    document.getElementById("tokyo").innerHTML = calcTime(9); // JST
}
setInterval(updateWorld, 1000);
</script>

Frequently Asked Questions

The simplest method (shown here) uses fixed UTC offsets. For perfect DST handling, you should use `Date.toLocaleString('en-US', { timeZone: 'America/New_York' })` which relies on the browser's built-in timezone database.

Yes. Just duplicate the HTML block and call the `calcTime` function with the correct UTC offset for that city.

Yes. It uses the user's system time as a base and adds/subtracts the offset, so it requires no server connection.