Open pipinet opened 3 years ago
Time Picker 只保证调整时间戳的时间部分。
但是你说的时区问题确实存在,需要考虑一下。
@07akioni 生成的时间戳用mysql的FROM_UNIXTIME处理不了,我看了一下有13位,比antd生成的多了3位,这三位都是0,感觉没有必要
@07akioni 生成的时间戳用mysql的FROM_UNIXTIME处理不了,我看了一下有13位,比antd生成的多了3位,这三位都是0,感觉没有必要
JS 默认的 valueof 就会出那么多位,三个零的话除以 1000 就解决了
因为 naive 的底层是 datefns 所以回是这种状况
可以尝试使用一下 https://moment.github.io/luxon/#/ 这里几乎是对iso-8601标准实现比较全的。
This function solves the problem (这个功能解决的问题)
time picker 返回的是当天的时间戳,应该是不正确的,这里面会涉及时区、与日期无关等众多因素
Expected API (期望的 API)
返回结果应该是 https://en.wikipedia.org/wiki/ISO_8601#Durations