Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!nuchat!sugar!peter From: peter@sugar.UUCP (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: why "gmtime" but not "read" and "write"? Message-ID: <815@sugar.UUCP> Date: Thu, 24-Sep-87 23:54:29 EDT Article-I.D.: sugar.815 Posted: Thu Sep 24 23:54:29 1987 Date-Received: Sat, 26-Sep-87 18:23:59 EDT References: <706@sugar.UUCP> <478@green.UUCP> Organization: Sugar Land UNIX - Houston, TX Lines: 25 In article <478@green.UUCP>, bill@green.UUCP (Bill Bogstad) writes: > In article <706@sugar.UUCP> peter@sugar.UUCP (Peter da Silva) writes: > >just doesn't seem consistent to me. Since most non-UNIX-based 'C' compilers > >in the real world implement read and write and *not* gmtime and localtime, > >you don't even have precedent behind you. > > "Most" systems have some type of real-time clock and it would be nice > to be able to access the clock from the C language. Having a standard way > to do so would be even nicer. The method chosen has been available in the > standard unix environment since at least Version 7. But part of the information in gmtime() and localtime() isn't available outside of UNIX: daylight-savings-time-flag, timezone. It's overkill. The standard should provide LOCALTIME with the final "daylight savings time" flag replaced by an innocuous filler that won't encourage people to expect it. GMTIME should not be in the standard at all. Also, what's wrong with time(0)? It's also in the standard, as is a new routine to allow time arithmetic. That would force libraries to have time kept in a useful fashion. The old Aztec 'C' library on the Amiga (which keeps julian time) used MS-DOS pseudo packed decimal format. -- -- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter -- 'U` Have you hugged your wolf today? -- Disclaimer: These aren't mere opinions... these are *values*.