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 aad45effbef54c77f9b3273c234d50dcc1a2417f Author: servantie <servantie.c@gmail.com> Date: Wed Jun 29 16:33:33 2016 +0200 modified the taskToJSONFormat method to include the current day --- src/main/java/org/chorem/jtimer/JTimerConfig.java | 2 +- src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/JTimerConfig.java b/src/main/java/org/chorem/jtimer/JTimerConfig.java index 1a857c4..cf70f92 100644 --- a/src/main/java/org/chorem/jtimer/JTimerConfig.java +++ b/src/main/java/org/chorem/jtimer/JTimerConfig.java @@ -299,7 +299,7 @@ public class JTimerConfig { IO_SAVER_AUTOSAVEDELAY("jtimer.io.saver.autosavedelay", "300"), IO_SYNC_CLASS("jtimer.io.synchronizer.class", "org.chorem.jtimer.io.TimerTaskSynchronizer"), - IO_SYNC_AUTOSYNCDELAY("jtimer.io.synchronizer.autosyncdelay", "10"), + IO_SYNC_AUTOSYNCDELAY("jtimer.io.synchronizer.autosyncdelay", "3600"), IO_SYNC_TIMEZONE("jtimer.io.synchronizer.timezone", "+01:00"), UI_IDLE_TIME("jtimer.ui.idletime", "300"), diff --git a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java index ffec6b0..c55d8d8 100644 --- a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java +++ b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java @@ -347,6 +347,8 @@ public class TimerTaskHelper { public static List<JsonObject> taskToJSONFormat(TimerTask task, boolean withAnnotations, String timezone) { Date startDate = task.getAllDaysAndTimes().firstKey(); Date endDate = new Date(); + //get the current day too by making endDate a day later + endDate.setTime(endDate.getTime() + 86400 * 1000L); List<JsonObject> resultingJSON = taskToJSONFormat(task, startDate, endDate, withAnnotations, timezone); return resultingJSON; } @@ -387,7 +389,7 @@ public class TimerTaskHelper { //as jtimer has time entries only for a day, the id of the times will be the date in yyyy-mm-dd format JsonObject periodElement = new JsonObject(); periodElement.addProperty("id", dateString); - periodElement.addProperty("startDate", dateString + timestamp + timezone); + periodElement.addProperty("startDate", dateString + timestamp); periodElement.addProperty("duration", entry.getValue()/1000); if (withAnnotations && !(getAnnotation(task, entry.getKey()).isEmpty())) { StringBuilder annotationBuilder = new StringBuilder(); @@ -407,6 +409,7 @@ public class TimerTaskHelper { jsonObjectList.add(responseJSON); } } + return jsonObjectList; } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.