Improve old portal timezone correction

(Still off by an hour during DST)
This commit is contained in:
Tanner Collin 2020-01-17 04:16:09 +00:00
parent 92ac996952
commit 94a296744c

View File

@ -173,7 +173,7 @@ for o in old:
new[f] = o.__dict__.get(f, None)
new['course'] = models.Course.objects.get(id=o.course_id)
new['old_instructor'] = o.instructor
new['datetime'] = str(o.datetime).replace('Z', '-07:00')
new['datetime'] = str(o.datetime).replace('+00:00', '-07:00')
models.Session.objects.create(**new)
print('Imported session #{} - {} {}'.format(