From d478c21059c85ea8b8ba7c55fa93f67ef83b0688 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 15 Jul 2026 16:12:27 +0000 Subject: [PATCH] Fix event date shown as Jan 1970 in Show Details modals Event createdAt is a Nostr timestamp in seconds, but TimeUtils.formatLongToCustomDateTimeWithSeconds expects milliseconds (Instant.ofEpochMilli), so the date always rendered as Jan 21, 1970. Convert to milliseconds at the call sites, matching how ActivitiesScreen and ApplicationsScreen already handle it. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01RGJT3Vb91p82TwmDZxqGem --- .../nostrsigner/ui/components/EncryptDecryptDetailModal.kt | 2 +- .../greenart7c3/nostrsigner/ui/components/EventDetailModal.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/EncryptDecryptDetailModal.kt b/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/EncryptDecryptDetailModal.kt index 6c7ac635..6eb295f8 100644 --- a/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/EncryptDecryptDetailModal.kt +++ b/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/EncryptDecryptDetailModal.kt @@ -97,7 +97,7 @@ fun EncryptDecryptDetailModal( ) EventSection( stringResource(R.string.date), - TimeUtils.formatLongToCustomDateTimeWithSeconds(event.createdAt), + TimeUtils.formatLongToCustomDateTimeWithSeconds(event.createdAt * 1000), { copyToClipboard(clipboard, "${event.createdAt}") }, ) if (event.content.isNotEmpty()) { diff --git a/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/EventDetailModal.kt b/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/EventDetailModal.kt index f96043aa..5dc5572f 100644 --- a/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/EventDetailModal.kt +++ b/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/EventDetailModal.kt @@ -110,7 +110,7 @@ fun EventDetailModal( ) EventSection( stringResource(R.string.date), - TimeUtils.formatLongToCustomDateTimeWithSeconds(event.createdAt), + TimeUtils.formatLongToCustomDateTimeWithSeconds(event.createdAt * 1000), { copyToClipboard(clipboard, "${event.createdAt}") },