mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-24 04:33:06 +00:00
fix: 修复返回时间时区不同的问题
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
const _ = require('lodash')
|
const _ = require('lodash')
|
||||||
|
const moment = require('moment')
|
||||||
|
|
||||||
function getTimeUnits(u) {
|
function getTimeUnits(u) {
|
||||||
const units = {
|
const units = {
|
||||||
@@ -169,7 +170,8 @@ export function getDayEnd(now) {
|
|||||||
if (!now) {
|
if (!now) {
|
||||||
now = new Date()
|
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) {
|
export function setUrlParam(url, name, value) {
|
||||||
|
Reference in New Issue
Block a user