The snapshot workflow was using the python datetime module directly,
which breaks on the strict timezone requirements of the live
dashboard. This commit uses the django timezone module instead
Change-Id: I04b43b127bd3d8eb8ac72aa9c84e24a5f154a880
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
##############################################################################
-import datetime
+from django.utils import timezone
import json
from booking.models import Booking
context = super(Select_Host_Step, self).get_context()
context['form'] = SnapshotHostSelectForm()
booking_hosts = {}
- now = datetime.datetime.now()
+ now = timezone.now()
user = self.repo_get(self.repo.SESSION_USER)
bookings = Booking.objects.filter(start__lt=now, end__gt=now, owner=user)
for booking in bookings: