Commit 7c89f78f authored by Kyle M Hall's avatar Kyle M Hall

Bug 16780 - Specify due date always sets time as AM when using 12 hour time format

This regression is occurs because the time format for the checkout
date/time widget is only meant to be given in 24 hour format. The time
due should not be converted to 12 hr time even if the library has 12
hour set as their preferred time format.

Test Plan:
1) Performat a backdated checkout with a date due that has a PM time
2) Note the date/time picker on the confirmition screen shows the time
   in AM/PM
2) Note the time is not stored correctly
3) Apply this patch
4) Repeate step 1
5) Note the confirmation date/time picker now show the time in 24hr
6) Note the time was stored correctly
Signed-off-by: default avatarClaire Gravely <[email protected]>
Signed-off-by: joubu's avatarJonathan Druart <[email protected]>
Signed-off-by: default avatarKyle M Hall <[email protected]>
parent ffcb3603
......@@ -162,7 +162,7 @@ for my $barcode ( @$barcodes ) {
my $stickyduedate = $query->param('stickyduedate') || $session->param('stickyduedate');
my $duedatespec = $query->param('duedatespec') || $session->param('stickyduedate');
$duedatespec = eval { output_pref( { dt => dt_from_string( $duedatespec ), dateformat => 'iso' }); }
$duedatespec = eval { output_pref( { dt => dt_from_string( $duedatespec ), dateformat => 'iso', timeformat => '24hr' }); }
if ( $duedatespec );
my $restoreduedatespec = $query->param('restoreduedatespec') || $duedatespec || $session->param('stickyduedate');
if ( $restoreduedatespec && $restoreduedatespec eq "highholds_empty" ) {
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment