Hacker News new | ask | show | jobs
by emmelaich 2792 days ago
Probably merely because it's hard to do and no one has sufficient motivation.

I can think of one good use case -- y2k style problems.

Also sometimes apps are tied to external events like legislation. It would be good to set the time forward for testing.

You can sort of do this with LD_PRELOAD but it can get hairy.

Also see @wmf's comment above.

2 comments

Another use case is dealing with tokens that assume globally synchronised clocks such as JWTs and Kerberos/Active Directory. Ideally all clocks would be perfectly synchronised but things happen.

For example, you might have one container that’s exchanging JWTs with a micro service that should be using AWS’s NTP servers and another that’s joined an Active Directory domain that should be using the AD NTP server. Right now you either need to run them on separate machines or expose yourself to interesting problems if clock skew happens.

If there is one thing Y2K taught us, its to ignore any worry about the 2038 problem until 2036, then make a HUGE deal out of it.

https://en.wikipedia.org/wiki/Year_2038_problem

Linux and glibc have been working on 2038 problems for at least the past decade.
There are plenty of other POSIX platforms out there.