fix(ui): use timezone-aware formatting for Last Read timestamps in book detail and progress sync modal

Replace hardcoded 12-hour Format() calls with FormatTimestamptzInTimezone()
so that the Last Read time respects the user's selected timezone preference.
Both book_detail.templ and book_detail_modals.templ now use the same
timezone-aware helper that was introduced in the timezone support feature.
This commit is contained in:
2026-04-28 21:12:01 -04:00
parent f69479db44
commit 59d0389d45
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -250,7 +250,7 @@ templ BookDetail(user User, book handlers.MediaDetail, errorMessage string) {
if book.ReadingProgress.LastReadAt.Valid {
<div>
<p style="color: var(--text-secondary)">Last Read</p>
<p>{ book.ReadingProgress.LastReadAt.Time.Format("01-02-2006 03:04 PM") }</p>
<p>{ templates.FormatTimestamptzInTimezone(book.ReadingProgress.LastReadAt, user.Timezone) }</p>
</div>
}
if book.ReadingProgress.LastSyncSource.Valid {
+1 -1
View File
@@ -110,7 +110,7 @@ templ ProgressSyncModal(book handlers.MediaDetail) {
}
if book.ReadingProgress.LastReadAt.Valid {
<p class="text-sm mt-2" style="color: var(--text-secondary);">
Last read: { book.ReadingProgress.LastReadAt.Time.Format("01-02-2006 03:04 PM") }
Last read: { FormatTimestamptzInTimezone(book.ReadingProgress.LastReadAt, user.Timezone) }
</p>
}
</div>