aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/pom.xml3
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java14
2 files changed, 15 insertions, 2 deletions
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 @@
<parent>
<groupId>MOA</groupId>
<artifactId>MOA</artifactId>
- <version>2.0.1</version>
+ <version>2.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>moa-common</artifactId>
- <!-- <version>2.0.0</version> -->
<packaging>jar</packaging>
<name>MOA common library</name>
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
@@ -107,6 +107,20 @@ public class DateTimeUtils {
}
/**
+ * Builds a <code>dateTime</code> value in UTC from a <code>Calendar</code> value.
+ * @param cal the <code>Calendar</code> value
+ * @return the <code>dateTime</code> 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 <code>dateTime</code> value from a <code>Calendar</code> value.
* @param cal the <code>Calendar</code> value
* @return the <code>dateTime</code> value