JBAS-1037 set expire time to 6am to reduce DST issues
authorBill Erickson <berickxx@gmail.com>
Thu, 17 Dec 2015 21:21:03 +0000 (16:21 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Set patron expire time to 6am so that expire dates spanning DST
boundaries don't make it appear as though the date is off by one day for
clients that don't honor timezone data.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/utility-scripts/import_students/generate-patrons-from-csv.pl

index eb1eff6..abe13b7 100755 (executable)
@@ -304,8 +304,11 @@ sub set_expire_date {
     # if dob occurs after july 1, expire date will occur the following year.
     $expire_year++ if ($mon > 7) or ($mon == 7 and $day > 1);
 
+    # Set hour to 6 to reduce likelyhood of DST/timezone 
+    # confusion causing day-off-by-one issues with external clients.
     my $expire_date = DateTime->new(
-        year => $expire_year, month => 7, day => 1, time_zone => 'local');
+        year => $expire_year, month => 7, 
+        day => 1, hour => 6, time_zone => 'local');
 
     $phash->{expire_date} = $expire_date;
 }