# --------------------- # check_license_expired # --------------------- # Returns true if the license expired. # Note, an invalid license, i.e. "123" indicates an expiration date of "01/Jan/1970 00:00:00", # hence we only consider expiration dates within the past 12 months subroutine(check_license_expired(string expiration_date), ( bool license_expired = false; int expiration_date_in_sec = date_time_to_epoc(expiration_date); int current_date_in_sec = now(); int d = current_date_in_sec - expiration_date_in_sec; if (d > 0 and d < (365 * 24 * 60 * 60)) then ( license_expired = true; ); # debug_message("\n\ncheck_license_expired - time delta in sec: " . d . "\n"); # debug_message("check_license_expired - license_expired: " . license_expired . "\n\n"); license_expired; ));