fix: update created_at timestamp display

- Change displayed time from weather_date to created_at in
  cities and weather arts show templates. This ensures that the
  time shown reflects when the record was created instead of the
  weather date which may not be accurate for representation.
This commit is contained in:
songtianlun 2025-02-08 09:25:08 +08:00
parent 1286eff996
commit 6281ca73a2
2 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@
<div class="flex items-center justify-between text-white">
<div class="text-2xl font-bold"><%= art.temperature %>°C</div>
<div class="text-right">
<div class="font-medium"><%= art.weather_date.strftime("%H:%M") %></div>
<div class="font-medium"><%= art.created_at.strftime("%H:%M") %></div>
<div class="text-sm opacity-80"><%= art.weather_date.strftime("%B %d, %Y") %></div>
</div>
</div>

View File

@ -56,7 +56,7 @@
<%= @weather_art.weather_date.strftime("%B %d, %Y") %>
</div>
<div class="badge badge-lg badge-secondary">
<%= @weather_art.weather_date.strftime("%H:%M") %>
<%= @weather_art.created_at.strftime("%H:%M") %>
</div>
</div>