Skip to content

always use timezone.localtime with format_date

Bengfort requested to merge fix-format-timezone into main

Django's docs on timezones explain that it "stores datetime information in UTC in the database, uses time-zone-aware datetime objects internally, and translates them to the end user’s time zone in templates and forms".

So in places where we format datetimes manually (e.g. for emails) the conversion to local time also needs to be done manually.

Most of these cases are internal, but the appointment reminder mails are critical.

Edited by Bengfort

Merge request reports