fix: date picker format error (#6392)

This commit is contained in:
Katherine 2025-03-09 17:48:40 +08:00 committed by GitHub
parent a1fe85bd03
commit 83681a387e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -89,7 +89,7 @@ const toMoment = (val: any, options?: Str2momentOptions) => {
}
if (dayjs.isDayjs(val)) {
return val.utcOffset(offsetFromString(offset));
return offset ? val.utcOffset(offsetFromString(offset)) : val;
}
if (gmt) {
return dayjs(val).utcOffset(0);