diff --git a/packages/field/src/components/Second/index.tsx b/packages/field/src/components/Second/index.tsx index 895c24c64b44..51572ada806a 100644 --- a/packages/field/src/components/Second/index.tsx +++ b/packages/field/src/components/Second/index.tsx @@ -20,7 +20,7 @@ export type FieldDigitProps = { export function formatSecond(result: number) { let formatText = ''; const d = Math.floor(result / (3600 * 24)); - const h = Math.floor(result / 3600); + const h = Math.floor((result / 3600) % 24); const m = Math.floor((result / 60) % 60); const s = Math.floor(result % 60); formatText = `${s}秒`; diff --git a/tests/field/__snapshots__/demo.test.ts.snap b/tests/field/__snapshots__/demo.test.ts.snap index 4aaf0c106c0f..dc375f23f2d8 100644 --- a/tests/field/__snapshots__/demo.test.ts.snap +++ b/tests/field/__snapshots__/demo.test.ts.snap @@ -347,7 +347,7 @@ exports[`field demos > 📸 renders ./packages/field/src/demos/base.tsx correctl class="ant-descriptions-item-content" > - 23天555小时33分钟20秒 + 23天3小时33分钟20秒