From owner-freebsd-questions Thu Dec 5 11:57:21 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F90037B401 for ; Thu, 5 Dec 2002 11:57:20 -0800 (PST) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DB9B43E4A for ; Thu, 5 Dec 2002 11:57:19 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id gB5JvFOR095040 for ; Thu, 5 Dec 2002 19:57:15 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id gB5JvAkq095039 for freebsd-questions@FreeBSD.ORG; Thu, 5 Dec 2002 19:57:10 GMT Date: Thu, 5 Dec 2002 19:57:10 +0000 From: Matthew Seaman To: freebsd-questions@FreeBSD.ORG Subject: Re: Perl question... calculating difference in time.. Message-ID: <20021205195710.GB94487@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , freebsd-questions@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-Spam-Status: No, hits=-3.0 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01, USER_AGENT,USER_AGENT_MUTT version=2.43 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Dec 05, 2002 at 02:00:20PM -0500, Jeff MacDonald wrote: > look into the perl module Date::Calc, > it's has ALOT of features that are quite useful for date manipulation. The Time::ParseDate module by David Muir Sharnoff looks just the ticket. http://search.cpan.org/author/MUIR/Time-modules-2002.1001/lib/Time/ParseDate.pm It essentially does the reverse of strftime(3) --- and once you've got the time expressed as seconds since the epoch, the rest of the calculations required should be easy. It's available in ports as part of devel/p5-Time. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message