From owner-freebsd-questions Thu Mar 5 22:38:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA11220 for freebsd-questions-outgoing; Thu, 5 Mar 1998 22:38:06 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA11169 for ; Thu, 5 Mar 1998 22:37:59 -0800 (PST) (envelope-from grog@lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.8.7/8.8.5) with ESMTP id RAA13474; Fri, 6 Mar 1998 17:07:41 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.8.8/8.8.7) id RAA07074; Fri, 6 Mar 1998 17:07:41 +1030 (CST) (envelope-from grog) Message-ID: <19980306170740.02786@freebie.lemis.com> Date: Fri, 6 Mar 1998 17:07:40 +1030 From: Greg Lehey To: michael dorin , questions@FreeBSD.ORG Subject: Re: localtime algorithm (or how can I calculate m/d/y from .. References: <199803052331.XAA24002@chaski.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89i In-Reply-To: <199803052331.XAA24002@chaski.com>; from michael dorin on Thu, Mar 05, 1998 at 11:31:11PM +0000 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 5 March 1998 at 23:31:11 +0000, michael dorin wrote: > > How does the localtime function covert seconds past 1970 into months, > days, year? > > Is there a simple algorithm? You have the source. Take a look at /usr/local/lib/libc/stdtime/localtime.c. Greg To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message