Improve old portal timezone correction
(Still off by an hour during DST)
This commit is contained in:
parent
92ac996952
commit
94a296744c
|
@ -173,7 +173,7 @@ for o in old:
|
||||||
new[f] = o.__dict__.get(f, None)
|
new[f] = o.__dict__.get(f, None)
|
||||||
new['course'] = models.Course.objects.get(id=o.course_id)
|
new['course'] = models.Course.objects.get(id=o.course_id)
|
||||||
new['old_instructor'] = o.instructor
|
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)
|
models.Session.objects.create(**new)
|
||||||
print('Imported session #{} - {} {}'.format(
|
print('Imported session #{} - {} {}'.format(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user