📅  最后修改于: 2022-03-11 15:03:24.983000             🧑  作者: Mango
user:~$ node
> currentDate = new Date()
2021-10-07T11:27:33.520Z
> msTillMidnightSinceEpoch = currentDate.setUTCHours(0,0,0,0)
1633564800000
> ISTOffsetMS = (5*60 + 30)*60*1000 // +5:30
19800000
> requiredDate = new Date(msTillMidnightSinceEpoch + ISTOffsetMS)
2021-10-07T05:30:00.000Z
> requiredDate.toISOString()
'2021-10-07T05:30:00.000Z'
>