如何在邮递员处把当前时间的地板打到一个小时



我是一名新来的邮递员。我想用当前时间的下限设置一个变量。示例:当前时间为"0";2022-09-07T05:17:59";(UTC时间(,但我想设置一个值为"0"的变量;2022-09-07T00:00:00";(UTC时间(有人帮我吗?非常感谢!

这不是一个非常优雅的解决方案,但应该可以使用

var floor_timestamp = new Date()
floor_timestamp.setMinutes(0)
floor_timestamp.setSeconds(0)
floor_timestamp.setMilliseconds(0)
console.log(floor_timestamp.toISOString())
pm.globals.set("timestamp", floor_timestamp)

最新更新