[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch master updated. 4e84fd93e902bda272f77338234c82dad857038a

Evergreen Git git at git.evergreen-ils.org
Wed May 21 21:37:41 EDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  4e84fd93e902bda272f77338234c82dad857038a (commit)
      from  e174630d6c666dcfe55d78147398978a9ad26295 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4e84fd93e902bda272f77338234c82dad857038a
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue May 20 14:30:20 2014 -0400

    LP#1321429: Use server-local time as best-guess
    
    When first calculating the shelf expire time, we assume "now" as
    the starting point by calling DateTime->now().  However, that gives
    us the time in UTC.  That's not good because closed dates are stored
    timezone-aware.  Instead, ask for server-local time.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
index 45b2133..794f2dd 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -1110,7 +1110,7 @@ sub set_hold_shelf_expire_time {
 
     $start_time = ($start_time) ?
         DateTime::Format::ISO8601->new->parse_datetime(cleanse_ISO8601($start_time)) :
-        DateTime->now;
+        DateTime->now(time_zone => 'local'); # without time_zone we get UTC ... yuck!
 
     my $seconds = OpenSRF::Utils->interval_to_seconds($shelf_expire);
     my $expire_time = $start_time->add(seconds => $seconds);

-----------------------------------------------------------------------

Summary of changes:
 .../perlmods/lib/OpenILS/Application/Circ/Holds.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list