智慧园区前端大屏
linwe
2024-11-14 4b7d2c5f13c7c816746ecd7c64fc4d8bb7580e70
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
export const getTime = () => {
    let yy = new Date().getFullYear()
    let mm = new Date().getMonth() + 1
    let dd = new Date().getDate()
    let hh = new Date().getHours()
    let mf =
        new Date().getMinutes() < 10
            ? "0" + new Date().getMinutes()
            : new Date().getMinutes()
    let ss =
        new Date().getSeconds() < 10
            ? "0" + new Date().getSeconds()
            : new Date().getSeconds()
    return yy + "-" + mm + "-" + dd + "  " + hh + ":" + mf + ":" + ss
}