From owner-freebsd-questions Wed Mar 14 12:27:21 2001 Delivered-To: freebsd-questions@freebsd.org Received: from tango.SoftHome.net (tango.SoftHome.net [204.144.231.49]) by hub.freebsd.org (Postfix) with SMTP id 958A537B718 for ; Wed, 14 Mar 2001 12:27:18 -0800 (PST) (envelope-from ertank@softhome.net) Received: (qmail 13237 invoked by uid 417); 14 Mar 2001 20:38:48 -0000 Received: from unknown (HELO greenkey) (212.253.32.87) by smtpa.softhome.net with SMTP; 14 Mar 2001 20:38:48 -0000 Message-ID: <000701c0acc5$73eb9e50$5720fdd4@greenkey> From: =?iso-8859-9?B?RXJ0YW4gS/zn/Gtv8Gx1?= To: Subject: date time with C (off topic) Date: Wed, 14 Mar 2001 22:29:08 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-9" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I'm trying to write a little C program (not c++). I want to calculate the next day. I have year, month and day values as integer as seperate variables. I'm not talking about the day that program runs. It is a prior date. I get it from a file. I do not have good C knowledge. I thought I just can convert the date value I have to seconds since 1.1.1970. After that I can add seconds for one day to the converted date value. But, I couldn't do because I couldn't manage how to calculate leap years. How can I do that calculation correctly? Or, is there a simpler way to do that? Or, a sample source code? Or something? Regards, -- Ertan Kucukoglu ertank@softhome.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message