
31 Jul
2025
31 Jul
'25
8:40 p.m.
On Thu, 31 Jul 2025 at 16:22, Kevin Cozens via Talk <talk@lists.gtalug.org> wrote:
One thing no one has yet mentioned is that time_t is a signed value. By changing the declaration to unsigned you immediately get another 68 or so years.
The problem with doing this is that there may be cases where the value is expected to be negative. For instance, birth dates, where those for years 1970 and higher are positive and those before 1970 are negative. Programs that treated time_t as unsigned wouldn't properly handle such dates before 1970. $ date -d '@-123456789' Tue 01 Feb 1966 09:26:51 PM EST -- Scott