Skip to content

Commit

Permalink
fix date formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
argl committed Dec 3, 2024
1 parent b785c3b commit cf13caf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/observatory/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export function Timestamp({ expires }: { expires: string }) {
if (d.toString() === "Invalid Date") {
return <div className="iso-date">{expires}</div>;
}
const ts = `${d.getFullYear()}-${d.getMonth() + 1}-${d.getDate()} ${d.getHours()}:${d.getMinutes()}:${d.getSeconds()} UTC`;
const ts = `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")} ${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}:${String(d.getSeconds()).padStart(2, "0")} UTC`;
return (
<>
<div className="iso-date">
Expand Down

0 comments on commit cf13caf

Please sign in to comment.