Lines 4-10
use DateTime::TimeZone;
Link Here
|
4 |
|
4 |
|
5 |
use C4::Context; |
5 |
use C4::Context; |
6 |
|
6 |
|
7 |
use Test::More tests => 67; |
7 |
use Test::More tests => 68; |
8 |
|
8 |
|
9 |
use Test::MockModule; |
9 |
use Test::MockModule; |
10 |
use Test::Warn; |
10 |
use Test::Warn; |
Lines 49-54
cmp_ok $date_string, 'eq', '2011-06-16 12:00 PM', 'iso output 12hr';
Link Here
|
49 |
$date_string = output_pref({ dt => $dt, dateformat => 'rfc3339' }); |
49 |
$date_string = output_pref({ dt => $dt, dateformat => 'rfc3339' }); |
50 |
like($date_string, qr/2011-06-16T12:00:00\+|-\d\d:\d\d/, 'RFC3339 output'); |
50 |
like($date_string, qr/2011-06-16T12:00:00\+|-\d\d:\d\d/, 'RFC3339 output'); |
51 |
|
51 |
|
|
|
52 |
$date_string = output_pref({ dt => $dt, dateformat => 'rfc3339', dateonly => 1 }); |
53 |
is($date_string, '2011-06-16', 'RFC3339 output'); |
54 |
|
52 |
# "notime" doesn't actually mean anything in this context, but we |
55 |
# "notime" doesn't actually mean anything in this context, but we |
53 |
# can't pass undef or output_pref will try to access the database |
56 |
# can't pass undef or output_pref will try to access the database |
54 |
$date_string = output_pref({ dt => $dt, dateformat => 'iso', timeformat => 'notime', dateonly => 1 }); |
57 |
$date_string = output_pref({ dt => $dt, dateformat => 'iso', timeformat => 'notime', dateonly => 1 }); |
55 |
- |
|
|