Date: Thu, 5 Dec 2002 14:00:20 -0500 From: "Jeff MacDonald" <jeff@interchange.ca> To: "Eric Six" <erics@sirsi.com>, <freebsd-questions@FreeBSD.ORG> Subject: RE: Perl question... calculating difference in time.. Message-ID: <HJEPJELDKPJEEIIFNLNHGECGCBAA.jeff@interchange.ca> In-Reply-To: <DC32C8CEB3F8D311B6B5009027DE5AD505E33F4F@stlmail.dra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
look into the perl module Date::Calc, it's has ALOT of features that are quite useful for date manipulation. jeff. > -----Original Message----- > From: owner-freebsd-questions@FreeBSD.ORG > [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Eric Six > Sent: Thursday, December 05, 2002 1:44 PM > To: 'freebsd-questions@FreeBSD.ORG' > Subject: Perl question... calculating difference in time.. > > > I know this isn't a perl list, but this is a perl on freebsd question! ;) > > I have a script that is sorting log files. I want to calculate the total > time between log entrys. Here is the format of the log files: > > Dec 05 09:51:48.452 info info.info data > ... > Dec 05 09:53:49.543 info info.info data > > The output should return something along the lines of: total time between > log entries 02:01:01.091. > > I have the time fields pulled out but I cannot figure out how to seprate > them into a calculatable format. And if this was run from after > midnight and > the log files rolled back to 23:00, how to calculate this..Any > help is much > appreciated! > > TIA > Eric > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?HJEPJELDKPJEEIIFNLNHGECGCBAA.jeff>