- SEE ALSO
- BUGS AND LIMITATIONS
- LICENSE AND COPYRIGHT
BuzzSaw::DateTime - A class which provides additional functionality to DateTime
This documentation refers to BuzzSaw::Filter version 0.12.0
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.
- from_date_string( $str )
This method will return a new object based on one of the following strings:
1 second after midnight on this day.
10 minutes ago.
1 second after midnight on the previous day.
1 second after midnight on the first day of the week.
1 second after midnight on the first day of the month.
1 second after midnight on the first day of the year.
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
strptimefunction. This should work if the string is well formatted, if not you might get something very weird returned.
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.
Please report any bugs or problems (or praise!) to email@example.com, feedback and patches are also always very welcome.
Stephen Quinney <firstname.lastname@example.org>
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.