【发布时间】:2019-10-21 16:56:54
【问题描述】:
在 thingsboard 中,我有一个服务器属性更新对话框的后处理功能。
update server attribute widget
post-processing date value fails
我需要将文本值(由用户在小部件中输入)转换为 unix 时间戳(毫秒精度)以将其存储到 thingsboard 属性中。
我也想使用这个函数来显示格式化的 ISO 日期字符串中的值。链接 YYYY-MM-DD hh:mm:ss.
据我了解,date.getMonth、getFullYear、... 函数对于 JavaScript 来说是相当标准的。我还需要做什么才能在 thingsboard 中使用它们?
有没有更好的方法来转换日期?
【问题讨论】:
标签: thingsboard