diff --git a/C4/Reserves.pm b/C4/Reserves.pm index fc76fc1344..6ed1543917 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -1157,7 +1157,7 @@ sub ModReserve { if ( defined( $suspend_until ) ) { if ( $suspend_until ) { - $suspend_until = eval { output_pref( { dt => dt_from_string( $suspend_until ), dateonly => 1 }); }; + $suspend_until = eval { output_pref( { dt => dt_from_string( $suspend_until ), dateonly => 1, dateformat => 'iso' }); }; $dbh->do("UPDATE reserves SET suspend = 1, suspend_until = ? WHERE reserve_id = ?", undef, ( $suspend_until, $reserve_id ) ); } else { $dbh->do("UPDATE reserves SET suspend_until = NULL WHERE reserve_id = ?", undef, ( $reserve_id ) ); diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t index f219f879d3..8767223b06 100755 --- a/t/db_dependent/Holds.t +++ b/t/db_dependent/Holds.t @@ -137,7 +137,7 @@ ModReserve({ $reserve = GetReserve( $reserve_id ); ok( $reserve->{'priority'} eq '4', "Test GetReserve(), priority changed correctly" ); ok( $reserve->{'suspend'}, "Test GetReserve(), suspend hold" ); -ok( $reserve->{'suspend_until'} eq '2013-01-01 00:00:00', "Test GetReserve(), suspend until date" ); +is( $reserve->{'suspend_until'}, '2013-01-01 00:00:00', "Test GetReserve(), suspend until date" ); ToggleSuspend( $reserve_id ); $reserve = GetReserve( $reserve_id );