File: 01format.t

package info (click to toggle)
libdatetime-format-db2-perl 0.05-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 72 kB
  • ctags: 5
  • sloc: perl: 65; makefile: 2
file content (22 lines) | stat: -rwxr-xr-x 620 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use strict;

use Test::More tests => 3;

use DateTime::Format::DB2;

my $mysql = 'DateTime::Format::DB2';

my $dt = DateTime->new( year   => 2000,
                        month  => 5,
                        day    => 6,
                        hour   => 15,
                        minute => 23,
                        second => 44,
                        time_zone => 'UTC',
                      );

{
    is( $mysql->format_date($dt), '2000-05-06', 'format_date' );
    is( $mysql->format_timestamp($dt), '2000-05-06-15.23.44', 'format_datetime' );
    is( $mysql->format_time($dt), '15:23:44', 'format_time' );
}