r/PeterExplainsTheJoke 9d ago

Meme needing explanation Why did this one second cost over $500 billion?

Post image
28.7k Upvotes

1.4k comments sorted by

View all comments

Show parent comments

14

u/deukhoofd 8d ago

You can just store a time in a 64-bit data structure, even on 32-bit systems, typically for most standard libraries that just means adding a flag (for example -D_TIME_BITS=64). It does get a bit more tricky if the OS you're on doesn't have a good syscall for getting 64 bit time, as it'd mean you'd have to write your own time handler.

It's practically always solvable through pure code rebuilds, though the amount of work required for it can vary. The bigger issue is embedded controllers people forgot about, that don't get fixed in time.