On Sat, 31 Jan 2015 12:12:08 +1300, Rikki Cattermole wrote: > On 31/01/2015 12:06 p.m., ketmar wrote: >> On Fri, 30 Jan 2015 22:38:20 +0000, Chris Williams wrote: >> >>> Unix timestamps can be negative >> WUT?! O_O > > Looks like we are both thinking the usual case. > > The standard Unix time_t (data type representing a point in time) is a > signed integer data type, traditionally of 32 bits (but see below), > directly encoding the Unix time number as described in the preceding > section. Being 32 bits means that it covers a range of about 136 years > in total. The minimum representable time is 1901-12-13, and the maximum > representable time is 2038-01-19. The second after 03:14:07 UTC > 2038-01-19 this representation overflows. This milestone is anticipated > with a mixture of amusement and dread; see year 2038 problem. > > From wikipedia. > > https://github.com/D-Programming-Language/druntime/blob/master/src/core/ stdc/time.d#L68 > > Looks like I got to modify it.
nobody ever planned "negative timestamps". using signed time_t was just a design error (nobody cares at the time). unix timestamps are timestamps for things created in unix. i can't imagine how you can create something BEFORE the unix itself (hence 1970 as a starting point -- with some gap to allow older files). there is no such thing as "negative timestamp", any negative timestamp is a bug.
signature.asc
Description: PGP signature