From 55a9ec00e1ff26f0bd4503a3db9c9d862b02b253 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Tue, 28 Apr 2026 21:12:01 -0400 Subject: [PATCH] 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. --- templates/book_detail.templ | 2 +- templates/book_detail_modals.templ | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/book_detail.templ b/templates/book_detail.templ index a132634..a0db0b6 100644 --- a/templates/book_detail.templ +++ b/templates/book_detail.templ @@ -250,7 +250,7 @@ templ BookDetail(user User, book handlers.MediaDetail, errorMessage string) { if book.ReadingProgress.LastReadAt.Valid {

Last Read

-

{ book.ReadingProgress.LastReadAt.Time.Format("01-02-2006 03:04 PM") }

+

{ templates.FormatTimestamptzInTimezone(book.ReadingProgress.LastReadAt, user.Timezone) }

} if book.ReadingProgress.LastSyncSource.Valid { diff --git a/templates/book_detail_modals.templ b/templates/book_detail_modals.templ index 288a41b..b5fe655 100644 --- a/templates/book_detail_modals.templ +++ b/templates/book_detail_modals.templ @@ -110,7 +110,7 @@ templ ProgressSyncModal(book handlers.MediaDetail) { } if book.ReadingProgress.LastReadAt.Valid {

- Last read: { book.ReadingProgress.LastReadAt.Time.Format("01-02-2006 03:04 PM") } + Last read: { FormatTimestamptzInTimezone(book.ReadingProgress.LastReadAt, user.Timezone) }

}