Tech News
← Back to articles

When JavaScript Decided My Day Starts at 9AM

read original related products more articles

published: 2025/07/26 category: dev tags: javascript , date , timezones

TL;DR:

new Date('2000-01-01') creates a date at midnight UTC, not local time.

In Japan (UTC+9), that means 2000-01-01T09:00:00, so our dashboard filters missed all data created before 9AM.

The Bug

We noticed something strange while fetching data for an admin dashboard: records created before 9AM were missing!

Our date filters were simple:

Which outputs a simple string like

const minDateString = '2000-01-01';

... continue reading