Fix: Metadata supports precise time selection (#12785)

### What problem does this PR solve?

Fix: Metadata supports precise time selection

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2026-01-23 09:33:34 +08:00
committed by GitHub
parent 7c9b6e032b
commit e9453a3971
12 changed files with 796 additions and 82 deletions

View File

@ -1,10 +1,11 @@
import dayjs from 'dayjs';
export function formatDate(date: any) {
export function formatDate(date: any, format?: string) {
const thisFormat = format || 'DD/MM/YYYY HH:mm:ss';
if (!date) {
return '';
}
return dayjs(date).format('DD/MM/YYYY HH:mm:ss');
return dayjs(date).format(thisFormat);
}
export function formatTime(date: any) {