Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.sys.apple Subject: Re: date converter Message-ID: <11923@smoke.BRL.MIL> Date: 10 Jan 90 09:06:00 GMT References: <1990Jan7.165450.29589@mintaka.lcs.mit.edu> <1184@husc6.harvard.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 16 In article <1184@husc6.harvard.edu> huang@husc4.UUCP (Howard Huang) writes: >ANSI C is supposed to support the conversion of seconds, but I believe >the actual details are machine-dependent. This is wrong. ANSI C time conversion involves an implementation- dependent representation of time as a time_t data type, which need not have any simple relationships to seconds since some epoch. The Standard C functions clock() and difftime() do produce some form of time in seconds, but these do not involve conversion to or from either a character representation of time or a struct tm (a "broken- down time", i.e. a collection of seconds, minutes, etc. component parts). IEEE Std 1003.1 (POSIX) and UNIX do impose the additional requirement that time_t be expressed in seconds since a particular epoch; however this is not an ANSI C requirement.