From 14c1d57b59dbce8b2ae93a3858f291fe97803d2a Mon Sep 17 00:00:00 2001 From: zhangdongxu Date: Tue, 25 Dec 2018 17:12:48 +0800 Subject: [PATCH] =?UTF-8?q?traffic=20=E8=B6=8B=E5=8A=BF=E5=9B=BE=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E6=A0=BC=E5=BC=8F=E5=8C=96=E6=94=B9=E4=B8=BAMM-dd=20H?= =?UTF-8?q?H:mm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/nis/web/service/restful/DashboardService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/nis/web/service/restful/DashboardService.java b/src/main/java/com/nis/web/service/restful/DashboardService.java index 36f6609..7eb36af 100644 --- a/src/main/java/com/nis/web/service/restful/DashboardService.java +++ b/src/main/java/com/nis/web/service/restful/DashboardService.java @@ -1255,7 +1255,8 @@ public class DashboardService extends BaseService { if ((!StringUtil.isEmpty(bandwidthListIPvx) && bandwidthListIPvx.size() > 0) || (!StringUtil.isEmpty(bandwidthListProtocol) && bandwidthListProtocol.size() > 0)) { // 划分时间段 - SimpleDateFormat sdf = new SimpleDateFormat("MM-dd HH:mm"); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + SimpleDateFormat sdf2 = new SimpleDateFormat("MM-dd HH:mm"); Date startTime = sdf.parse(beginDate); Date endTime = sdf.parse(endDate); List dateRangeList = new ArrayList(); @@ -1265,7 +1266,7 @@ public class DashboardService extends BaseService { while (calendar.getTime().compareTo(endTime) <= 0) { dateRangeList.add(calendar.getTime()); - strDateRangeList.add(sdf.format(calendar.getTime())); + strDateRangeList.add(sdf2.format(calendar.getTime())); calendar.add(Calendar.MINUTE, 5); } String[] addrTypes = getFiledTypeByName("addr_type");