Fix syncing status and change api for scrt.network

This commit is contained in:
liangping
2021-09-21 17:26:22 +08:00
parent 2d111e9d8a
commit 91101648fc
3 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -145,7 +145,8 @@ export function toDuration(value) {
// unit(y M d h m s ms)
export function timeIn(time, amount, unit = 's') {
return dayjs().isAfter(dayjs(time).add(amount, unit))
const input = dayjs(time).add(amount, unit)
return dayjs().unix() > input.unix()
}
export function toDay(time, format = 'long') {