Dates and times in JavaScript, Temporal, and PostgreSQL
How dates break in real code: local times that never happen, offsets that aren't time zones, instants versus wall-clock time, leap seconds, ISO 8601 traps, meetings that drift across a DST change, and why new Date("2026-01-15") isn't the day you meant. Every answer is backed by a spec, a database, or a snippet you can run.
Questions
- Not answered. What does
getDate()return here on a server running inAmerica/New_York? - Not answered. Why do
new Date("2026-01-15")andnew Date("2026-01-15T00:00:00")produce different instants? - Not answered. What integer does
new Date("2026-01-15T12:00:00Z").getTimezoneOffset()return withTZ=America/New_York? - Not answered. What time zone does a JavaScript
Dateinstance store internally? - Not answered. A client sends
2026-07-04T12:00:00-04:00. What can you conclude about the sender's time zone? - Not answered. What UTC offset does the IANA zone
Etc/GMT+5actually have? - Not answered. How does the time zone identifier
ESTbehave differently fromAmerica/New_York? - Not answered. How many instants correspond to
2026-03-08T02:30:00inAmerica/New_York? - Not answered. With Temporal's default disambiguation, what instant does
2026-03-08T02:30in New York resolve to? - Not answered. Which Temporal
disambiguationvalue makes an impossible or ambiguous local time throw instead of resolve? - Not answered. Why can two log lines timestamped
2026-11-01 01:15and2026-11-01 01:45in New York be 90 minutes apart? - Not answered. Why does
2026-11-01T01:30:00-04:00[America/New_York]carry both an offset and a zone name? - Not answered. What wall-clock time results from adding 86,400,000 ms to midnight on 2026-03-08 in New York?
- Not answered. How many hours pass between a 09:00 New York meeting on 2026-03-07 and the next one on 2026-03-08?
- Not answered. Which values should be stored as wall time plus an IANA zone rather than as a UTC instant?
- Not answered. A 2023 meeting stored as a UTC instant fired an hour late for Mexican attendees. Why?
- Not answered. Why is a date of birth the wrong thing to store in a timestamp column?
- Not answered. Which Temporal type models "May 14" as a recurring anniversary with no year attached?
- Not answered. Why does Temporal provide
startOfDay()instead of letting you set the time to 00:00? - Not answered. What does
hoursInDayreturn for a New YorkZonedDateTimeon 2026-03-08? - Not answered. By how many minutes does Lord Howe Island shift its clocks for daylight saving?
- Not answered. How many minutes ahead of UTC is
Asia/Kathmandu? - Not answered. How many different calendar dates can be in use around the world at the same moment?
- Not answered. How many hours ahead of UTC is the furthest-forward time zone in regular use?
- Not answered. Which ISO 8601 week date does the calendar date 2025-12-29 have?
- Not answered. What is the difference between the ISO 8601 durations
P1MandPT1M? - Not answered. Which timestamps are valid ISO 8601 but rejected by RFC 3339?
- Not answered. In RFC 3339, how does the offset
-00:00differ from+00:00? - Not answered. When is sorting ISO 8601 timestamp strings lexicographically the same as sorting by instant?
- Not answered. How does POSIX "seconds since the Epoch" handle a leap second?
- Not answered. By how many seconds does TAI lead UTC as of 2026?
- Not answered. What did the 2022 General Conference on Weights and Measures decide about leap seconds?
- Not answered. Why should elapsed-time measurements not use the wall clock?
- Not answered. How many distinct UTC offsets does the abbreviation
CSTrefer to in common use? - Not answered. What does PostgreSQL physically store in a
timestamptzcolumn? - Not answered. What type and value does
timestamptz '2026-01-15 12:00:00+00' AT TIME ZONE 'America/New_York'produce? - Not answered. Why is
BETWEEN '2026-01-15 00:00' AND '2026-01-15 23:59:59.999'the wrong way to select one day? - Not answered. How does MySQL's
TIMESTAMPtype differ fromDATETIMEin its handling of zones? - Not answered. An API sends
"createdAt": 1767225600and the UI renders January 1970. What went wrong? - Not answered. What is the largest value a signed 32-bit
time_tcan hold? - Not answered. What does
JSON.stringify({ at: new Date(NaN) })produce? - Not answered. Does
2026-01-30plus one month plus one day equal the same date as plus one day plus one month? - Not answered. Why does the tz database model
Europe/Dublinas having negative daylight saving in winter? - Not answered. What happened to Friday, 30 December 2011 in Samoa?
- Not answered. What offset does the tz database record for Brussels before standard time was adopted?
- Not answered. Why do Morocco's clock changes fall on different dates each year?
- Not answered. How does iCalendar keep a weekly meeting on the same wall clock across a DST change?
- Not answered. How many hours does a New York night shift from 22:00 on 2026-10-31 to 06:00 on 2026-11-01 last?
- Not answered. How should a browser determine the user's IANA time zone?
- Not answered. Why did calendar software show wrong times in March 2007 in the United States?