Show discount deadline in a timezone-aware way

Also, fix it and the access expiration deadline to not hardcode
the date presentation in an American way.
This commit is contained in:
Michael Terry
2021-01-07 15:56:00 -05:00
parent 180227d6b1
commit 1482755bbd
9 changed files with 87 additions and 100 deletions

View File

@@ -42,7 +42,7 @@ class TestApplicability(ModuleStoreTestCase):
CourseModeFactory.create(course_id=self.course.id, mode_slug='verified')
now_time = datetime.now(tz=pytz.UTC).strftime(u"%Y-%m-%d %H:%M:%S%z")
ExperimentData.objects.create(
user=self.user, experiment_id=REV1008_EXPERIMENT_ID, key=str(self.course), value=now_time
user=self.user, experiment_id=REV1008_EXPERIMENT_ID, key=str(self.course.id), value=now_time
)
holdback_patcher = patch(