NAME

BuzzSaw::DateTime - A class which provides additional functionality to DateTime

VERSION

This documentation refers to BuzzSaw::Filter version 0.11.2

SYNOPSIS

use BuzzSaw::DateTime;

my $dt = BuzzSaw::DateTime->from_date_string( "this-week" );

DESCRIPTION

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.

SUBROUTINES/METHODS

This class provides one additional method beyond those provided by the DateTime module.

from_date_string( $str )

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.

seconds from unix epoch

A string which is purely digits will be treated as being the number of seconds since the unix epoch.

variously formatted date/time strings

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.

DEPENDENCIES

DateTime, DateTime::Duration, Date::Parse

SEE ALSO

BuzzSaw

PLATFORMS

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

BUGS AND LIMITATIONS

Please report any bugs or problems (or praise!) to bugs@lcfg.org, feedback and patches are also always very welcome.

AUTHOR

Stephen Quinney <squinney@inf.ed.ac.uk>

LICENSE AND COPYRIGHT

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.