From 33a0a83c930c930be213222bc948e7280674e080 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 16 Apr 2014 13:45:00 +0200 Subject: change version to 2.0.2-Snapshot --- common/pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'common') diff --git a/common/pom.xml b/common/pom.xml index fffb1a460..37c083ec7 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -3,11 +3,10 @@ MOA MOA - 2.0.1 + 2.0.2 4.0.0 moa-common - jar MOA common library -- cgit v1.2.3 From e568d9464c43705f157ac82e8d299adcc1369049 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 17 Apr 2014 17:25:50 +0200 Subject: add method to build default DateTime string --- .../java/at/gv/egovernment/moa/util/DateTimeUtils.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'common') diff --git a/common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java index 1e219b784..dbc9faba6 100644 --- a/common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java +++ b/common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java @@ -106,6 +106,20 @@ public class DateTimeUtils { return f.format(cal.getTime()); } + /** + * Builds a dateTime value in UTC from a Calendar value. + * @param cal the Calendar value + * @return the dateTime value + */ + public static String buildDateTimeUTC(Date cal) { + + SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); + f.setTimeZone(TimeZone.getTimeZone("UTC")); + + return f.format(cal); + + } + /** * Builds a dateTime value from a Calendar value. * @param cal the Calendar value -- cgit v1.2.3