fix: 修复Safari时间显示问题

Closes https://github.com/jumpserver/trello/issues/237
This commit is contained in:
OrangeM21
2020-08-18 19:25:52 +08:00
committed by 老广
parent 844bc5b44f
commit ecae504a80

View File

@@ -65,12 +65,15 @@ function cleanDateStr(d) {
case 1:
d = d.split('+')[0].trimRight()
break
case 2:
d = d.replace(/-/g, '/')
}
}
return null
return d
}
export function toSafeLocalDateStr(d) {
console.log(d)
const date = safeDate(d)
// let date_s = date.toLocaleString(getUserLang(), {hour12: false});
const date_s = date.toLocaleString(getUserLang(), { hourCycle: 'h23' })