AI TOOLS

Share a countdown timer as a link

A launch, sale or event countdown from Claude or ChatGPT is one HTML file. Why it can end hours early for people in other time zones, why it drifts, and how to switch the link off after the date.

4 min read·

Ask Claude or ChatGPT for a countdown to a launch, a sale or an event and you get one HTML file with a target date and a script that updates every second. It needs no server, so it can go out as a link.

Check the three things below before you send it. Each was tested in Chrome with the browser set to different time zones.

It ends at a different moment for each viewer

A target written as new Date("2026-12-31T00:00:00") has no time zone, so each browser reads it as its own local midnight. Tested: a viewer in New York counted down to 05:00 UTC and a viewer in Berlin to 23:00 UTC the day before, six hours apart. The same happened with "2026/12/31" and "Dec 31, 2026 12:00 AM".

A date with no time at all, "2026-12-31", is read as midnight UTC instead. In New York that is 7:00 PM on December 30, so the timer hits zero five hours before the viewer's own new year.

If the moment is the same for everyone, such as a launch at 9 AM New York time, write the offset into the target: new Date("2026-12-31T09:00:00-05:00"). Both test browsers then counted to the same instant. Or ask the AI tool: "Write the target date with an explicit UTC offset."

Show the time in the viewer's zone

Next to the timer, print the end time so people can plan. toLocaleString with month, day, hour, minute and timeZoneName "short" printed "Dec 31, 12:00 AM EST" in New York and "Dec 31, 6:00 AM GMT+1" in Berlin for the same target.

Do not combine dateStyle or timeStyle with timeZoneName. Chrome threw "TypeError: Invalid option", and a script that throws stops, so the timer never starts. To always show the organizer's zone, add timeZone: "America/New_York" to the same options.

It drifts, then goes negative

Many generated timers subtract one from a counter on every tick. A tick is not guaranteed to run on time: when the page was blocked for 3 seconds, the counter still said 5 seconds left while the real remaining time was 3. Browsers also slow timers in background tabs, so the gap grows while the tab is hidden.

Compute the remaining time from the clock on every tick instead: remaining = target - Date.now(). It is correct after any delay.

Once the target passes, remaining is negative and the display shows values such as -1. Clamp it with Math.max(0, remaining), stop the interval, and swap the numbers for a message such as "Doors are open".

Upload it and send the link

Drag the HTML file onto the FileShare Pro dashboard and copy the link. Viewers need no account, and they can leave comments on the page, such as a question about the event.

To change the date after sending, upload the new file over the old one and the link stays the same: updating a shared link without changing it.

To take the page down after the event, open Share and choose "Anyone, until a date". After that date the link returns "Link expired" instead of the page.

To collect sign-ups under the timer, see sharing an RSVP page and collecting the replies. Related: sharing a calculator and why a page that works in chat breaks when hosted.

Frequently asked

Does the timer use the viewer's clock?

Yes. Date.now() reads the device clock, so a device set to the wrong time shows the wrong remaining time. The target date in the file is the same for everyone once it carries an offset.

Will the countdown page show up in Google?

No. Shared files carry a noindex header: keeping a preview out of Google.

Got a page to share?

Drop the file, copy the link — live in seconds, free plan included.

Start sharing free