Skip to content

Commit

Permalink
[Fix][Server] Fix Date format
Browse files Browse the repository at this point in the history
  • Loading branch information
xxzuo committed Nov 16, 2023
1 parent 1a09e11 commit a04b235
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import io.datavines.server.enums.Priority;
import org.springframework.transaction.annotation.Transactional;

import static io.datavines.common.CommonConstants.YYYY_MM_DD_HH_MM_SS;
import static io.datavines.core.constant.DataVinesConstants.SPARK;

@Service("jobExecutionService")
Expand Down Expand Up @@ -375,8 +376,8 @@ public JobExecutionTrendBar getJobExecutionTrendBar(JobExecutionDashboardParam d
Date endDate = DateUtils.stringToDate(dashboardParam.getEndTime());
startDateStr = DateUtils.format(DateUtils.addDays(endDate,-6),"yyyy-MM-dd");
} else {
Date endDate = DateUtils.parse(dashboardParam.getEndTime(), "yyyy-MM-dd HH:mm:dd");
Date startDate = DateUtils.parse(dashboardParam.getStartTime(), "yyyy-MM-dd HH:mm:dd");
Date endDate = DateUtils.parse(dashboardParam.getEndTime(), YYYY_MM_DD_HH_MM_SS);
Date startDate = DateUtils.parse(dashboardParam.getStartTime(), YYYY_MM_DD_HH_MM_SS);
long days = DateUtils.diffDays(endDate,startDate);
if (days > 7) {
endDate = DateUtils.addDays(startDate, 7);
Expand Down

0 comments on commit a04b235

Please sign in to comment.