On Sun, Aug 22, 2021 at 10:30:26PM +0200, Alex fxmbsw7 Ratchev wrote: > why disregard or invalid, mark 0 is that date, less is minus, .. all working
It's not that simple. Calendars get really *interesting* if you go farther back in history. The switch from the Julian to the Gregorian calendar did not happen at the same time in every country. There's no reason for the implementers of Unix systems to have to worry about all of that complexity when you call the function that gives the *current* date and time. So they don't. There is no legitimate situation in which gettimeofday() can ever return a negative value. Intentionally setting your system clock to a point in time before the Epoch is simply inviting undefined behaviors and bugs.