浏览代码

修复创建时间早于当前时间的场景,time_stamp保存错误问题

locky 1 年之前
父节点
当前提交
25594ad79c
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Controller/SensorGateway/SmartSceneController.py

+ 2 - 0
Controller/SensorGateway/SmartSceneController.py

@@ -1152,6 +1152,8 @@ class SmartSceneView(View):
                 time_string = CommonService.get_date_from_timestamp(now_time, tz)
                 time_string += ' {:02d}:{:02d}:00'.format(hour, minute)
                 time_stamp = CommonService.convert_to_timestamp(tz, time_string)
+                if time_stamp < now_time:
+                    time_stamp += 24 * 60 * 60
                 time_dict = {
                     'time_stamp': time_stamp
                 }