Report task due times correctly in ChangesHappened

pull/14/head
Sam Bosley 12 years ago
parent afe15a91c0
commit b17bd9f027

@ -291,9 +291,12 @@ public class DateUtilities {
return result; return result;
} }
public static String timeToIso8601(long time) { public static String timeToIso8601(long time, boolean includeTime) {
Date date = new Date(time); 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);
} }
} }

@ -162,8 +162,12 @@ public class ChangesHappened<TYPE extends RemoteModel, OE extends OutstandingEnt
if (l != null) { if (l != null) {
if (l == 0 && property.checkFlag(Property.PROP_FLAG_USER_ID)) if (l == 0 && property.checkFlag(Property.PROP_FLAG_USER_ID))
return ActFmPreferenceService.userId(); return ActFmPreferenceService.userId();
else if (property.checkFlag(Property.PROP_FLAG_DATE)) else if (property.checkFlag(Property.PROP_FLAG_DATE)) {
return DateUtilities.timeToIso8601(l); boolean includeTime = true;
if (Task.DUE_DATE.equals(property) && !Task.hasDueTime(l))
includeTime = false;
return DateUtilities.timeToIso8601(l, includeTime);
}
return l; return l;
} else { } else {
return getAsString(data); return getAsString(data);

Loading…
Cancel
Save