This is an automated email from the git hooks/post-receive script. New commit to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 4c3886a652a9864d805fd0468ceb66020110a71f Author: servantie <servantie.c@gmail.com> Date: Thu Jul 7 15:43:46 2016 +0200 display of lastSync --- .../java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java index 9515df8..c75664b 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java @@ -98,6 +98,9 @@ public class TimerTaskSyncInfoEditor extends FrameView implements ActionListener /** timezone */ protected String timezone; + /** dateFormat for display */ + protected DateFormat df; + /** * UpdaterView constructor. * @param application parent reference @@ -115,6 +118,7 @@ public class TimerTaskSyncInfoEditor extends FrameView implements ActionListener this.task = task; timezone = "+01:00"; updateJson = new ArrayList<>(); + df = new SimpleDateFormat("dd/MM/yy HH:mm:ss"); setComponent(getMainComponent()); @@ -171,7 +175,7 @@ public class TimerTaskSyncInfoEditor extends FrameView implements ActionListener Date lastSyncTime = syncInfo.getLastSync(); //if there has been an update before, display its date if ((lastSyncTime != null) && lastSyncTime.after(new Date(0))) { - lastUpdate.setText(lastSyncTime.toString()); + lastUpdate.setText(df.format(lastSyncTime)); //logging change of lastSync if (log.isDebugEnabled()) { log.debug("Last Sync time loaded : " + lastSyncTime.toString()); @@ -329,7 +333,6 @@ public class TimerTaskSyncInfoEditor extends FrameView implements ActionListener //display last Sync Time if (lastUpdate != null && syncInfo.getLastSync() != null) { if (syncInfo.getLastSync().after(new Date(0))) { - DateFormat df = new SimpleDateFormat("dd/MM/yy HH:mm:ss"); lastUpdate.setText(df.format(syncInfo.getLastSync())); lastUpdate.setVisible(true); lastSyncDateLabel.setVisible(true); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.