Correct timezone data from old portal scrape
This commit is contained in:
parent
b6573f1d72
commit
ec5f17d4d3
|
@ -62,7 +62,7 @@ SESSION_FIELDS = [
|
|||
'id',
|
||||
# course_id -> course
|
||||
# instructor -> old_instructor
|
||||
'datetime',
|
||||
# datetime -> fix timezone
|
||||
'cost',
|
||||
]
|
||||
|
||||
|
@ -173,6 +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')
|
||||
|
||||
models.Session.objects.create(**new)
|
||||
print('Imported session #{} - {} {}'.format(
|
||||
|
|
Loading…
Reference in New Issue
Block a user