Skip to content

Commit 7b765a1

Browse files
Update specifyweb/frontend/js_src/lib/components/Notifications/hooks.tsx
Co-authored-by: Copilot <[email protected]>
1 parent fbff437 commit 7b765a1

File tree

1 file changed

+1
-1
lines changed
  • specifyweb/frontend/js_src/lib/components/Notifications

1 file changed

+1
-1
lines changed

specifyweb/frontend/js_src/lib/components/Notifications/hooks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function formatDateForServer(isoString: string): string {
174174
); // Magic regex to match ISO date format
175175
if (!match) return isoString; // If the format is unexpected, return the original string. At least this won't crash.
176176
const [_, year, month, day, hours, minutes, seconds] = match;
177-
return `${year}-${Number.parseInt(month, 10)}-${Number.parseInt(day, 10)} ${hours}:${minutes}:${seconds}`;
177+
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')} ${hours}:${minutes}:${seconds}`;
178178
}
179179

180180
export const exportsForTests = {

0 commit comments

Comments
 (0)