添加文件时间

This commit is contained in:
xy
2024-10-23 18:43:22 +08:00
parent ca9193b861
commit 4e0b4b6b90
2 changed files with 10 additions and 3 deletions

View File

@@ -157,13 +157,13 @@ public class OfflineDataUploadServiceImpl implements OfflineDataUploadService {
BeanUtils.copyProperties(item,vo);
long startTime = item.getPrjTimeStart();
if (startTime != 0) {
LocalDateTime dateTime = Instant.ofEpochMilli(startTime*1000).atZone(ZoneId.systemDefault()).toLocalDateTime();
LocalDateTime dateTime = Instant.ofEpochMilli((startTime-8*3600)*1000).atZone(ZoneId.systemDefault()).toLocalDateTime();
String formattedDate = dateTime.format(formatter);
vo.setStartTime(formattedDate);
}
long endTime = item.getPrjTimeEnd();
if (endTime != -1) {
LocalDateTime dateTime = Instant.ofEpochMilli(endTime*1000).atZone(ZoneId.systemDefault()).toLocalDateTime();
LocalDateTime dateTime = Instant.ofEpochMilli((endTime-8*3600)*1000).atZone(ZoneId.systemDefault()).toLocalDateTime();
String formattedDate = dateTime.format(formatter);
vo.setEndTime(formattedDate);
}