From b17bd9f027f829272d0e21b3af2db9b617738630 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Fri, 18 Jan 2013 11:41:04 -0800 Subject: [PATCH] Report task due times correctly in ChangesHappened --- api/src/com/todoroo/andlib/utility/DateUtilities.java | 7 +++++-- .../astrid/actfm/sync/messages/ChangesHappened.java | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/api/src/com/todoroo/andlib/utility/DateUtilities.java b/api/src/com/todoroo/andlib/utility/DateUtilities.java index a14f3d469..4faea254b 100644 --- a/api/src/com/todoroo/andlib/utility/DateUtilities.java +++ b/api/src/com/todoroo/andlib/utility/DateUtilities.java @@ -291,9 +291,12 @@ public class DateUtilities { return result; } - public static String timeToIso8601(long time) { + public static String timeToIso8601(long time, boolean includeTime) { Date date = new Date(time); - return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(date); //$NON-NLS-1$ + String formatString = "yyyy-MM-dd'T'HH:mm:ssZ"; //$NON-NLS-1$ + if (!includeTime) + formatString = "yyyy-MM-dd"; //$NON-NLS-1$ + return new SimpleDateFormat(formatString).format(date); } } diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/messages/ChangesHappened.java b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/messages/ChangesHappened.java index 1d214da92..784011b20 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/messages/ChangesHappened.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/messages/ChangesHappened.java @@ -162,8 +162,12 @@ public class ChangesHappened