更新时间:2023-11-05 12:00:10
可在文档中找到 。有了类似于时刻的图书馆,我恳请您阅读完整的文档。它非常重要。
This is found in the documentation. With a library like moment, I urge you to read the entirety of the documentation. It's really important.
假设输入文本是根据用户的当地时间输入的:
Assuming the input text is entered in terms of the users's local time:
var expires = moment(date).valueOf();
如果指示用户实际输入UTC日期/时间,则:
If the user is instructed actually enter a UTC date/time, then:
var expires = moment.utc(date).valueOf();