|
@@ -161,7 +161,7 @@ public class OpcTaskService {
|
|
|
remoteOpcLog.setDay(localDateTime.getDayOfMonth());
|
|
|
// remoteOpcLog.setHour(localDateTime.getHour());
|
|
|
// remoteOpcLog.setMinute(localDateTime.getMinute());
|
|
|
- remoteOpcLog.setRemark(localDateTime.getHour() + ":" + localDateTime.getMinute() + ":" + localDateTime.getSecond() + ":" + "," + result.getValue() + ";");
|
|
|
+ remoteOpcLog.setRemark(result.getTime().split(" ")[1] + "," + result.getValue() + ";");
|
|
|
remoteOpcLogList.add(remoteOpcLog);
|
|
|
//log.info("id: " + result.getId() + ", value: " + result.getValue() + ", time: " + result.getTime());
|
|
|
}
|
|
@@ -176,4 +176,9 @@ public class OpcTaskService {
|
|
|
}
|
|
|
log.info("结束读取redis1");
|
|
|
}
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ String time = "2022-11-12 12:04:06";
|
|
|
+ System.out.println(time.split(" ")[1]);
|
|
|
+ }
|
|
|
}
|