Explorar el Código

修复订单时间段显示

linhaohong hace 1 año
padre
commit
fdbf8a152e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      AdminController/CloudServiceManage/AgentDeviceController.py

+ 1 - 1
AdminController/CloudServiceManage/AgentDeviceController.py

@@ -223,7 +223,7 @@ class AgentDeviceView(View):
             metric_type = int(request_dict.get('metric_type', 0))
             metric_type = int(request_dict.get('metric_type', 0))
 
 
             # endTime变成每个月最后一天
             # endTime变成每个月最后一天
-            end_datetime = datetime.utcfromtimestamp(endTime)
+            end_datetime = datetime.fromtimestamp(endTime)
             month_str = end_datetime.strftime('%Y-%m')
             month_str = end_datetime.strftime('%Y-%m')
             year, month = int(month_str.split('-')[0]), int(month_str.split('-')[1])
             year, month = int(month_str.split('-')[0]), int(month_str.split('-')[1])
             end = calendar.monthrange(year, month)[1]
             end = calendar.monthrange(year, month)[1]