From 78473a8c3483c7c28bf165b165eaf1b3cb0c8337 Mon Sep 17 00:00:00 2001 From: Lanlan Date: Fri, 25 Sep 2020 16:17:42 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-40496=20=E3=80=9010.0.10=E5=9B=9E?= =?UTF-8?q?=E5=BD=92=E3=80=91=E8=AE=BE=E8=AE=A1=E5=99=A8=E9=87=8C=E7=9A=84?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8D=87=E7=BA=A7=E4=B8=8E=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E7=9A=84=E6=9B=B4=E6=96=B0=E5=8D=87=E7=BA=A7=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/update/ui/dialog/UpdateMainDialog.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java b/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java index 3992be6a9..05608c62e 100644 --- a/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java +++ b/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java @@ -544,7 +544,7 @@ public class UpdateMainDialog extends UIDialog { private void showDownLoadInfo() { //形如 Build#release-2018.07.31.03.03.52.80 String buildNO = downloadFileConfig.optString("buildNO"); - Date jarDate = (new SimpleDateFormat("yyyy.MM.dd")).parse(buildNO, new ParsePosition(buildNO.indexOf("-") + 1)); + Date jarDate = (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss")).parse(buildNO, new ParsePosition(buildNO.indexOf("-") + 1)); String serverVersionNO = downloadFileConfig.optString("versionNO"); String currentVersionNO = ProductConstants.RELEASE_VERSION; String[] serverVersionSplitStr = serverVersionNO.split("\\."); @@ -556,8 +556,8 @@ public class UpdateMainDialog extends UIDialog { //形如 Build#release-2018.07.31.03.03.52.80 String currentNO = GeneralUtils.readBuildNO(); if (!".".equals(StableUtils.getInstallHome())) { - Date currentDate = (new SimpleDateFormat("yyyy.MM.dd")).parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1)); - if (DateUtils.subtractDate(jarDate, currentDate, DateUtils.DAY) > 0) { + Date currentDate = (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss")).parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1)); + if (DateUtils.subtractDate(jarDate, currentDate, DateUtils.SECOND) > 0) { updateButton.setEnabled(true); updateLabel.setVisible(true); loadingLabel.stopLoading(buildNO.contains("-") ? buildNO.substring(buildNO.lastIndexOf("-") + 1) : buildNO);