diff --git a/www/conservancy/apps/assignment/forms.py b/www/conservancy/apps/assignment/forms.py index a55f07a9..1497e978 100644 --- a/www/conservancy/apps/assignment/forms.py +++ b/www/conservancy/apps/assignment/forms.py @@ -1,3 +1,5 @@ +import datetime + from django import forms from django.core.validators import ValidationError from django.utils import timezone @@ -7,7 +9,9 @@ from .terms import TERMS def validate_in_past(value): - if value > timezone.now().date(): + # Adding a day to allow the current date anywhere on earth, regardless of + # the server timezone. + if value > timezone.now().date() + datetime.timedelta(days=1): raise ValidationError('Enter a date in the past') diff --git a/www/conservancy/templates/assignment/assignment_form.html b/www/conservancy/templates/assignment/assignment_form.html index c54355b1..5ef74338 100644 --- a/www/conservancy/templates/assignment/assignment_form.html +++ b/www/conservancy/templates/assignment/assignment_form.html @@ -12,6 +12,11 @@