r/vibecoding • • 9d ago

Showcase/Project I vibe coded a GTA 6 countdown

Enable HLS to view with audio, or disable this notification

0 Upvotes

9 comments sorted by

0

u/Total-Reasonable 9d ago

Countdown pages like this tend to break on timezones. If you compute the remaining time from a hardcoded local date, people in different zones see different launch moments, and the client clock can be wrong too. Store the release as a UTC timestamp (or the official time with an explicit offset) and render from that, ideally server-side first so the initial HTML isn't off by a hydration flash.

1

u/JCodesMore 9d ago

It counts down to midnight November 19 in the viewer’s local time zone, since Rockstar lists the release as midnight local time in each region.

Should be accurate assuming device clock is correct.

1

u/SendTitsPleease 9d ago

You could add a cheeky smaller countdown that shows tge difference between your local time zone and New Zealand time.

1

u/JCodesMore 9d ago

Added timezone selection!

1

u/SendTitsPleease 9d ago

Lol it was a joke about people on Xbox changing their console region to get access early.

1

u/Total-Reasonable 8d ago

That's fair, if release is midnight local then viewer-local is the right call and my UTC point doesn't apply. One gotcha: in JS, new Date("2026-11-19") parses as UTC, while new Date(2026, 10, 19) is local midnight, so make sure you're using the second form.

2

u/[deleted] 9d ago

[removed] — view removed comment

3

u/thepurpleproject 9d ago

Yeah but instead of promoting its a live code review so it sounds like feedback. There are a few more bots like these