Date: Wed, 26 Oct 2022 09:40:24 -0400 (EDT) From: Mouse <mo...@rodents-montreal.org> Message-ID: <202210261340.jaa25...@stone.rodents-montreal.org>
| Yes, but it's not necessary to map it to a _correct_ value. For the uses I mentioned, it isn't - but localtime() (or gmtime(), the same problem exists there) has no idea of the use that will be made of the resulting struct. They need to be accurate, or indicate an error, not simply perform value substitution because it happens to be convenient. | For those | purposes, it would be enough to convert anything out of range to, say, | (proleptic) Gregorian year 9999, or 1000000, or some such. And so that would need to be done by bounding the time_t being passed in, as the caller knows when some random huge time is OK when the value is huge (+ or -) rather than the correct one being required. | [....] I don't see any good way to reconcile these. Welcome to the wonderful world of computing time... What seems to be the simplest of measurements is in fact by far the most complex, and the least understood. kre