]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1485374: Use client TZ in the database when supplied to the server
authorMike Rylander <mrylander@gmail.com>
Mon, 3 Aug 2015 17:27:56 +0000 (13:27 -0400)
committerKathy Lussier <klussier@masslnc.org>
Fri, 27 Jan 2017 19:45:50 +0000 (14:45 -0500)
commit0d4a1f2bc2d69491e96fb9564c402c81c5707d06
tree9d79f577a2f6e280d379322fb4664034629bfdc3
parent3b36b462e1bffff16f44c0d6835aea4af61ff52b
LP#1485374: Use client TZ in the database when supplied to the server

In LP#1485371 we teach OpenSRF how to discover and pass the client timezone
to the server.  Now we can use that information to temporarily put the server
into that timezone, including database sessions, so that dates and times
are calculated and reported based on the timezone of the client.

To do that we:

 * Teach CStore and friends to use the client-supplied time zone
 * Teach Storage to use $ENV{TZ} for the db timezone inside transactions,
   and by default except for search-y methods
 * Teach the TPAC to set the client TZ at login

This requires javascript to be enabled in the TPAC, and investigates the
client timezone at patron login time.  No times are displayed in TPAC
interfaces before the patron logs in, so there is no point in detecting
the timezone before this point.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Conflicts:
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm

Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/c-apps/oils_sql.c
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/storage.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
Open-ILS/src/templates/opac/parts/js.tt2
Open-ILS/src/templates/opac/parts/login/form.tt2