fix time zone bug
parent
de6d6cadd7
commit
4320647061
|
@ -1,7 +1,7 @@
|
|||
import { formatTime } from '@/utils/index.js'
|
||||
|
||||
describe('Utils:formatTime', () => {
|
||||
const d = 1531475641067 // "2018-07-13 17:54:01"
|
||||
const d = new Date(1531475641067) // "2018-07-13 17:54:01"
|
||||
|
||||
it('test now', () => {
|
||||
expect(formatTime(+new Date() - 1)).toBe('刚刚')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { parseTime } from '@/utils/index.js'
|
||||
|
||||
describe('Utils:parseTime', () => {
|
||||
const d = 1531475641067 // "2018-07-13 17:54:01"
|
||||
const d = new Date(1531475641067) // "2018-07-13 17:54:01"
|
||||
it('timestamp', () => {
|
||||
expect(parseTime(d)).toBe('2018-07-13 17:54:01')
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue