From b16416772975409226e9775662b95279f3a77410 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 12 Apr 2016 14:50:12 +0200 Subject: [PATCH] Accept today as a future date As expiration occures on next day --- .../share/perl5/vendor_perl/esmith/FormMagick/Panel/expireaccounts.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/expireaccounts.pm b/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/expireaccounts.pm index 8af0f1c..1d294a8 100644 --- a/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/expireaccounts.pm +++ b/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/expireaccounts.pm @@ -316,7 +316,7 @@ sub is_positive_int{ return 'OK'; } -# Take a string representing a date, must be YYY-MM-DD format, and in the future, or an empty string +# Take a string representing a date, must be YYY-MM-DD format, and in the future (including today), or an empty string sub is_future_date_or_empty { my ($self, $date_string) = @_; return 'OK' if ($date_string eq ''); @@ -330,7 +330,7 @@ sub is_future_date_or_empty { }; return $self->localise('DATE_FORMAT_INVALID') unless ($date); my $now = DateTime->now; - return $self->localise('DATE_IS_PASSED') unless ($date > $now); + return $self->localise('DATE_IS_PASSED') unless ($date >= $now); return 'OK'; }