🐞 fix(时间显示):修复ios和部分安卓手机上显示时间错误的问题

This commit is contained in:
xuan
2022-12-06 16:49:17 +08:00
parent ec7f234dc4
commit 46e5c33bf7
11 changed files with 58 additions and 58 deletions
+2 -2
View File
@@ -115,7 +115,7 @@ export const formatWeightDiv = (val, digit = weightDigit) => {
return strip(Number(val / digit)) || 0
}
export const formatDateTime = (val, fmt = 'YYYY-MM-DD HH:mm:ss') => {
export const formatDateTime = (val, fmt = 'YYYY/MM/DD HH:mm:ss') => {
if (val) {
const time = new Date(val)
const Y = time.getFullYear()
@@ -132,7 +132,7 @@ export const formatDateTime = (val, fmt = 'YYYY-MM-DD HH:mm:ss') => {
.replace('HH', h.toString().padStart(2, '0'))
.replace('mm', m.toString().padStart(2, '0'))
.replace('ss', s.toString().padStart(2, '0'))
console.log('fmt', fmt)
return fmt
}
else {