Skip to content

Commit bfc887e

Browse files
committed
Coderabbit suggestion to include support for minutes for some timezones like Nepal
1 parent b8215c6 commit bfc887e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/webapp/app/components/primitives/DateTime.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,8 @@ function DateTimeTooltipContent({
275275
const offset = -new Date().getTimezoneOffset();
276276
const sign = offset >= 0 ? "+" : "-";
277277
const hours = Math.abs(Math.floor(offset / 60));
278-
return `(UTC ${sign}${hours})`;
278+
const minutes = Math.abs(offset % 60);
279+
return `(UTC ${sign}${hours}${minutes ? `:${minutes.toString().padStart(2, "0")}` : ""})`;
279280
};
280281

281282
return (

0 commit comments

Comments
 (0)