Subject: unsigned time_t's? (was Re: kern/6347)
To: Gandhi woulda smacked you <greywolf@starwolf.com>
From: Perry E. Metzger <perry@piermont.com>
List: current-users
Date: 07/13/1999 12:18:03
Gandhi woulda smacked you <greywolf@starwolf.com> writes:
> On Tue, 13 Jul 1999, Dave Sainty wrote:
> 
> # ...check out those modification times!
> # Setuid additions:
> # prwsr-xr-x 18164 2633305079 670483187 5545397811823284715 \
> #	Sep 10 14:41:52 1914 /vol/tequila/userC/NetBSD-sup/pkgsrc/x11/wmthemes
>                         ^^^^
> # Dave
> # 
> 
> ...you mean our time_t is still interpreted as a signed value?  That's not
> very Y1.990K compliant :-)
> 
> [FWIW: Solaris 7 interprets time_t as unsigned, which extends years to
>  somewhere in 2100 or so...]

I can't believe this.

there are times when system calls (like adjtime()) require negative
values. time_t's are signed specifically because I need to be able to
specify negative offsets all over the place. Sure, time only moves
forward, but relative times can be both positive and negative.

In any case, we'll have 64 bit time_t's long before 2038.

Perry