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 => 72; |
7 |
use Test::More tests => 76; |
8 |
|
8 |
|
9 |
use Test::MockModule; |
9 |
use Test::MockModule; |
10 |
use Test::Warn; |
10 |
use Test::Warn; |
Lines 249-254
is( output_pref( { dt => $dt, dateonly => 1 } ), '01/01/1900', 'dt_from_string s
Link Here
|
249 |
$dt = dt_from_string('2015-01-31 01:02:03'); |
249 |
$dt = dt_from_string('2015-01-31 01:02:03'); |
250 |
is( output_pref( {dt => $dt} ), '31/01/2015 01:02', 'dt_from_string should fallback to sql format' ); |
250 |
is( output_pref( {dt => $dt} ), '31/01/2015 01:02', 'dt_from_string should fallback to sql format' ); |
251 |
|
251 |
|
|
|
252 |
# 12hr format |
253 |
$dt = dt_from_string('2015-01-31 01:02 AM'); |
254 |
is( output_pref( {dt => $dt} ), '31/01/2015 01:02', 'dt_from_string ' ); |
255 |
$dt = dt_from_string('2015-01-31 01:02:03 AM'); |
256 |
is( output_pref( {dt => $dt} ), '31/01/2015 01:02', 'dt_from_string ' ); |
257 |
$dt = dt_from_string('2015-01-31 01:02 PM'); |
258 |
is( output_pref( {dt => $dt} ), '31/01/2015 13:02', 'dt_from_string ' ); |
259 |
$dt = dt_from_string('2015-01-31 01:02:03 PM'); |
260 |
is( output_pref( {dt => $dt} ), '31/01/2015 13:02', 'dt_from_string ' ); |
261 |
|
262 |
|
252 |
# output_pref with no parameters, single parameter (no hash) |
263 |
# output_pref with no parameters, single parameter (no hash) |
253 |
is( output_pref(), undef, 'Call output_pref without parameters' ); |
264 |
is( output_pref(), undef, 'Call output_pref without parameters' ); |
254 |
try { |
265 |
try { |
255 |
- |
|
|