Claus Färber > DateTime-Format-SQLite-0.11 > DateTime::Format::SQLite

Download:
DateTime-Format-SQLite-0.11.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.11   Source  

NAME ^

DateTime::Format::SQLite - Parse and format SQLite dates and times

SYNOPSIS ^

  use DateTime::Format::SQLite;

  my $dt = DateTime::Format::SQLite->parse_datetime( '2003-01-16 23:12:01' );

  # 2003-01-16 23:12:01
  DateTime::Format::SQLite->format_datetime($dt);

DESCRIPTION ^

This module understands the formats used by SQLite for its date, datetime and time functions. It can be used to parse these formats in order to create DateTime objects, and it can take a DateTime object and produce a timestring accepted by SQLite.

NOTE: SQLite does not have real date/time types but stores everything as strings. This module deals with the date/time strings as understood/returned by SQLite's date, time, datetime, julianday and strftime SQL functions. You will usually want to store your dates in one of these formats.

METHODS ^

This class offers the methods listed below. All of the parsing methods set the returned DateTime object's time zone to the UTC zone because SQLite does always uses UTC for date calculations. This means your dates may seem to be one day off if you convert them to local time.

AUTHOR ^

Claus Färber <CFAERBER@cpan.org>

based on DateTime::Format::MySQL by David Rolsky.

^

Copyright © 2008 Claus Färber.

Copyright © 2003 David Rolsky.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO ^

http://datetime.perl.org/

http://www.sqlite.org/lang_datefunc.html

syntax highlighting: