mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
Fix off-by-one dates on provider history
We chunk history entries by their YYYY-MM-DD date representation to display them day-by-day. However trying to convert a YYYY-MM-DD string into a timestamp is unpredictable, and was causing our dates to be one day out (probably because of midnight/daylight savings/general datetime horrors). This commit changes the code to do the same thing as the history page, which is look at the `updated_at` field on the first entry to get a datetime object and from that the formatted date we show in the headings on the page.
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
{% for day, versions in versions %}
|
||||
<h2 class="heading-small top-gutter">
|
||||
{% if day %}
|
||||
{{ day|format_date_human|title }}
|
||||
{{ versions[0]['updated_at']|format_date_human|title }}
|
||||
{% else %}
|
||||
Start
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user