From 420174d3dd8f1741086262f0aa08bfe0f62d99b7 Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Sun, 14 Mar 2021 11:26:14 +0800 Subject: [PATCH] explorer: Fix midnight timestamps (#15843) --- explorer/src/utils/date.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/explorer/src/utils/date.ts b/explorer/src/utils/date.ts index b06dffb8d9..56c8155380 100644 --- a/explorer/src/utils/date.ts +++ b/explorer/src/utils/date.ts @@ -12,7 +12,7 @@ export function displayTimestamp( hour: "numeric", minute: "numeric", second: "numeric", - hour12: false, + hourCycle: "h23", timeZoneName: shortTimeZoneName ? "short" : "long", }).format(expireDate); return `${dateString} at ${timeString}`; @@ -33,7 +33,7 @@ export function displayTimestampUtc( hour: "numeric", minute: "numeric", second: "numeric", - hour12: false, + hourCycle: "h23", timeZone: "UTC", timeZoneName: shortTimeZoneName ? "short" : "long", }).format(expireDate);