Two hosts walk through the Unix Year 2038 problem: time in many Unix systems is stored as a 32-bit signed count of seconds since Jan 1, 1970, which overflows on January 19, 2038 and flips negative, breaking file- and time-comparison logic (e.g., Make). They trace the problem back to sensible historical trade-offs - two-digit years and tight storage were driven by punch cards and early disks, not simple negligence - and contrast engineering guided by measurement with decisions made from feeling. Coverage includes the smaller "DJ10K" scare and practical remediation: 64-bit platforms are immune, Linux kernel 5.6+ implements fixes, and filesystem support varies (ext4, btrfs, xfs work with correct configuration; older ext3 does not). Database treatments differ too: Postgres uses 64-bit timestamptz (safe until year 294,276), MySQL packs datetime into five bytes, SQLite stores ISO 8601 strings, and DuckDB uses 64-bit microsecond timestamps.
They run a rapid survey of real rollover and calendar bugs to show how pervasive the class is: GPS week-number rollovers (1999, 2019, future), NTP’s 32-bit unsigned wrap (Feb 7, 2036), Postgres XID wraparound mitigated by autovacuum, the Boeing 787 51-day generator issue, Deep Impact lost to a 32-bit tenths-of-a-second overflow, 16-bit PID/TCP limits, Discord’s troubles with 64-bit Snowflake IDs versus JavaScript’s 53-bit safe integers, IPv4 exhaustion and slow IPv6 uptake, and AACS DRM’s 32-bit expiry problem that can brick players. Leap-year errors include Excel/Lotus’s 1900 bug, PS3 bricking on Feb 29, 2010, and the Zune clock freeze. The closing argument insists on writing software that anyone can fix and maintain rather than creating opaque systems that depend on a single keeper.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.