From 2c7d8eb5085e283d7e0e702e41053db58e5ef251 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Wed, 3 Dec 2014 16:40:50 -0500 Subject: [PATCH] LP#1402797 Adjust timestamp with local timezone before truncating to the date Signed-off-by: Mike Rylander Signed-off-by: Kathy Lussier --- Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js index 3f3518d0e5..7558251dd9 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js @@ -223,7 +223,13 @@ function($scope, $q, $routeParams, egCore , egUser, patronSvc , // Fire off the due-date updater for each circ. // When all is done, close the dialog $scope.ok = function(args) { - var due = args.due_date.toISOString().replace(/T.*/,''); + // toISOString gives us Zulu time, so + // adjust for that before truncating to date + var adjust_date = new Date( $scope.args.date ); + adjust_date.setMinutes( + $scope.args.date.getMinutes() - adjust_date.getTimezoneOffset() + ); + var due = adjust_date.toISOString().replace(/T.*/,''); console.debug("applying due date of " + due); var promises = []; -- 2.11.0