|
var fmt = import("fmt")
var time = import("time")
SetDeviceData("设备名->F年",fmt.Sprintf("%d",time.Now().Year()))
SetDeviceData("设备名->F月",fmt.Sprintf("%d",time.Now().Month()))
SetDeviceData("设备名->F日",fmt.Sprintf("%d",time.Now().Day()))
SetDeviceData("设备名->F时",fmt.Sprintf("%d",time.Now().Hour()))
SetDeviceData("设备名->F时", fmt.Sprintf("%d", time.Now().Hour()))
SetDeviceData("设备名->F分", fmt.Sprintf("%d", time.Now().Minute()))
SetDeviceData("设备名->F秒", fmt.Sprintf("%d", time.Now().Second()))
需要创建自定义变量 F年 F月 F日 F时 F分 F秒
|
|