Time::Piece::DB2 - Adds DB2-specific methods to Time::Piece


Time-Piece-DB2 documentation  | view source Contained in the Time-Piece-DB2 distribution.

Index


NAME

Top

Time::Piece::DB2 - Adds DB2-specific methods to Time::Piece

SYNOPSIS

Top

  use Time::Piece::DB2;

  my $time = localtime;

  print $time->db2_date;
  print $time->db2_time;
  print $time->db2_timestamp;

  my $time = Time::Piece->from_db2_date( $db2_date );
  my $time = Time::Piece->from_db2_time( $db2_time );
  my $time = Time::Piece->from_db2_timestamp( $db2_timestamp );

DESCRIPTION

Top

Using this module instead of, or in addition to Time::Piece adds a few DB2-specific date/time methods to Time::Piece objects.

OBJECT METHODS

Top

* db2_date
* db2_time
* db2_timestamp

Returns the date and/or time in a format suitable for use by DB2.

CONSTRUCTORS

Top

* from_db2_date
* from_db2_time
* from_db2_timestamp

Given a date, time, or timestamp as returned from DB2, these constructors return a new Time::Piece object.

BUGS

Top

Time::Piece itself only works with times in the Unix epoch, this module has the same limitation. However, DB2 itself handles date and timestamp columns from '1000-01-01'. Feeding in times outside of the Unix epoch to any of the constructors has unpredictable results.

AUTHOR

Top

Author: Mark Ferris <m.ferris@geac.com>

COPYRIGHT

Top

SEE ALSO

Top

Time::Piece


Time-Piece-DB2 documentation  | view source Contained in the Time-Piece-DB2 distribution.