On Monday, 9 April 2007 at 22:20:11 -0600, M. Warner Losh wrote: > In message: <[EMAIL PROTECTED]> > "Greg 'groggy' Lehey" <[EMAIL PROTECTED]> writes: >> On Monday, 9 April 2007 at 2:48:26 -0700, Brian Somers wrote: >>> I don't understand what this means. File times are in UTC aren't >>> they? >> >> No, they're in time_t. But if you import files from other systems, >> you frequently get times which are off by some time zone offset. > > time_t is UTC, by definition (sadly, POSIX has enshrined a broken > definition of UTC as the time_t definition, but that's not important > right now).
The definition of time_t is simply a number of seconds since a specified event. It's true that this event was the turn of the year/decade in UTC, but that doesn't make it UTC. Currently my time_t is 1176181168; that's not directly recognizable as any time zone. > It cannot be a localtime. Localtime conversion of time_t is done by > libc to print the local time. But libc also needs to convert time_t to UTC. >> The case in point is that when importing files from digital cameras > > FAT doesn't deal in time_t. It deals in 'local time' only, encoded in > a funky way. Right. And that's the largest part of the problem. > The rest of what you say is correct, but since there is much confusion > around time_t I thought I'd be pedantic. Nothing wrong with being pedantic :-) Greg -- See complete headers for address and phone numbers.
pgpk6AkMJJ7Vi.pgp
Description: PGP signature