BuzzSaw::DateTime - A class which provides additional functionality to DateTime
This documentation refers to BuzzSaw::Filter version 0.10.4
use BuzzSaw::DateTime;
my $dt = BuzzSaw::DateTime->from_date_string( "this-week" );
This module extends the DateTime module to provide an extra constructor method. This method provides the ability to parse dates in a variety of formats and styles to create a new DateTime object. In particular, this module supports the date specifier strings used by the Linux Audit Framework.
The BuzzSaw project provides a suite of tools for processing log file entries. Entries in files are parsed and filtered into a set of events of interest which are stored in a database. A report generation framework is also available which makes it easy to generate regular reports regarding the events discovered.
This class provides one additional method beyond those provided by the DateTime module.
This method will return a new object based on one of the following strings:
now
Right now.
today
1 second after midnight on this day.
recent
10 minutes ago.
yesterday
1 second after midnight on the previous day.
this-week
1 second after midnight on the first day of the week.
this-month
1 second after midnight on the first day of the month.
this-year
1 second after midnight on the first day of the year.
week-ago
Seven days ago.
A string which is purely digits will be treated as being the number of seconds since the unix epoch.
Anything else that does not match something which has already been mentioned above is passed to the Date::Parse strptime function. This should work if the string is well formatted, if not you might get something very weird returned.
strptime
DateTime, DateTime::Duration, Date::Parse
BuzzSaw
This is the list of platforms on which we have tested this software. We expect this software to work on any Unix-like platform which is supported by Perl.
ScientificLinux6
Please report any bugs or problems (or praise!) to bugs@lcfg.org, feedback and patches are also always very welcome.
Stephen Quinney <squinney@inf.ed.ac.uk>
Copyright (C) 2012 University of Edinburgh. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the terms of the GPL, version 2 or later.
To install BuzzSaw::DB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm BuzzSaw::DB
CPAN shell
perl -MCPAN -e shell install BuzzSaw::DB
For more information on module installation, please visit the detailed CPAN module installation guide.