frontend: don't have Django manage the time zone Django globally defaults to Chicago time zone, which of course no one really wants. Fortunately, we have local settings, where we previously didn't override this. The documentation suggests that setting this to 'None' will avoid doing local time adjustments within Django: https://docs.djangoproject.com/en/2.0/ref/settings/#time-zone And then the logging module appears to handle the local time conversion appropriately. BUG=chromium:784033 TEST=`test_that ...` shows times that match my local time zone Change-Id: Ic0ad9b5abe685e27dcdedaefea6cf211f765b0b5 Signed-off-by: Brian Norris <[email protected]> Reviewed-on: https://chromium-review.googlesource.com/1005723 Reviewed-by: Dan Erat <[email protected]> Reviewed-by: Aviv Keshet <[email protected]>
diff --git a/frontend/settings_lite.py b/frontend/settings_lite.py index ea179a5..6a6fc7d 100644 --- a/frontend/settings_lite.py +++ b/frontend/settings_lite.py
@@ -15,6 +15,10 @@ # 'frontend.tko', ) +# Use UTC, and let the logging module handle local time. +USE_TZ = False +TIME_ZONE = None + # Required for Django to start, even though not used. SECRET_KEY = 'Three can keep a secret if two are dead.'