mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-23 20:17:54 +00:00
fix: 修复返回时间时区不同的问题
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const _ = require('lodash')
|
||||
const moment = require('moment')
|
||||
|
||||
function getTimeUnits(u) {
|
||||
const units = {
|
||||
@@ -169,7 +170,8 @@ export function getDayEnd(now) {
|
||||
if (!now) {
|
||||
now = new Date()
|
||||
}
|
||||
return new Date(new Date(now.toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1)
|
||||
const zoneTime = moment(now).utc().endOf('month').format('YYYY-MM-DD HH:mm:ss')
|
||||
return moment(zoneTime).utc().toDate()
|
||||
}
|
||||
|
||||
export function setUrlParam(url, name, value) {
|
||||
|
Reference in New Issue
Block a user