Fixes locale issue with edited_at date of post on the dashboard (#12948)

The issue is caused because published_timestamp` is converted to local date wherea the `edited_at` date is not.

Fixed by using `local_date` while presenting the `edited_at` date to keep the behaviour same.
This commit is contained in:
Deepak Mahakale 2021-03-10 15:58:07 +05:30 committed by GitHub
parent 10a02f46d4
commit 7a7826fe5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,8 @@
<strong class="fw-medium">Published:</strong>
<%= local_date(article.published_timestamp, show_year: article.displayable_published_at.year != Time.current.year) %>
<% if article.edited? %>
<strong class="fw-medium pl-2">Edited:</strong> <time datetime="<%= article.edited_at.utc.iso8601 %>"><%= article.readable_edit_date %></time>
<strong class="fw-medium pl-2">Edited:</strong>
<%= local_date(article.edited_at, show_year: article.edited_at.year != Time.current.year) %>
<% end %>
<% if article.collection_id %>
<strong class="fw-medium pl-2">Series:</strong> <%= article.series %>