[Logwatch-Devel] Date arithmetic

Systems Administrator sysadmin@sunet.com.au
Fri, 7 Nov 2003 11:17:45 +1100 (EST)

On Thu, 6 Nov 2003, Kenneth Porter wrote:

> --On Friday, November 07, 2003 9:59 AM +1100 Systems Administrator
> <sysadmin@sunet.com.au> wrote:
> > 	I'd prefer to have "yesterday" keep its current meaning, and have 
> > something else represent what you're after.
> Any suggestions on a term? My concern today is that to use "yesterday"
> effectively, I have to start logwatch at 12:01 am or I'll miss data. I'd
> rather  always look at the last 24 hours.

	'today'?  Because that certainly can't be in the future :).  Or 
maybe 'lastday'?  Or, as Kirk suggested, 'last 24 hours' :).  

> > 	Agreed.  I've been using Time::ParseDate for something similar.  
> > 	On the other subject, I don't have Date::Manip, but am happy to 
> > install it as long as I have an RPM.
> I mention Manip because I found that on my Red Hat 7.2 system when looking for
> modules in the Date class. I think I've seen ParseDate on later RH releases.
> The author of Manip, on CPAN, says that it's the Swiss Army Knife of date
> manipulation classes and sacrifices speed for completeness. My only concern is
> that we be able to parse dates from several different log sources, including
> syslog, BIND, and Apache. (Are there i18n issues here? For example, do any of
> these sources use non-English month names in a non-English locale?)

	Ok, don't mind me not having it -- I run a cut-down version of 
RH7.2, and put things on as I need.  But I'm looking at upgrading to 
Fedora Core 1 anyway.  


Tim Nelson
Systems Administrator
Sunet Internet
Tel: +61 3 5241 1155
Fax: +61 3 5241 6187
Web: http://www.sunet.com.au/
Email: sysadmin@sunet.com.au