LP#1879983: ensure that date comparison parses slot date correctly
authorGalen Charlton <gmc@equinoxinitiative.org>
Wed, 17 Jun 2020 20:20:39 +0000 (16:20 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 17 Jun 2020 20:20:39 +0000 (16:20 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/templates/opac/myopac/holds_curbside.tt2

index 47fe394..cf6b0f5 100644 (file)
             <span class="egtd">[%
                 disable_arrival_button = 1; # assume arrival is not yet allowed
                 IF appointment && appointment.slot;
-                    stime = date.format(appointment.slot, '%s');
+                    stime = date.format(ctx.parse_datetime(appointment.slot), '%s');
                     now_time = date.format(date.now, '%s');
                     IF now_time >= stime;
                         disable_arrival_button = 0; # if 'now' is after the slot time, allow arrival