aboutsummaryrefslogtreecommitdiff
path: root/common/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/main/java')
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java86
1 files changed, 43 insertions, 43 deletions
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 8d57f911a..1e219b784 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
@@ -49,49 +49,49 @@ public class DateTimeUtils {
/** Error messages. */
private static MessageProvider msg = MessageProvider.getInstance();
- /**
- * 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
- */
- public static String buildDateTime(Calendar cal, boolean useUTC) {
-
- if (useUTC)
- return buildDateTimeUTC(cal);
- else {
- StringWriter out = new StringWriter();
- out.write("" + cal.get(Calendar.YEAR));
- out.write("-");
- out.write(to2DigitString(cal.get(Calendar.MONTH) + 1));
- out.write("-");
- out.write(to2DigitString(cal.get(Calendar.DAY_OF_MONTH)));
- out.write("T");
- out.write(to2DigitString(cal.get(Calendar.HOUR_OF_DAY)));
- out.write(":");
- out.write(to2DigitString(cal.get(Calendar.MINUTE)));
- out.write(":");
- out.write(to2DigitString(cal.get(Calendar.SECOND)));
- int tzOffsetMilliseconds =
- cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET);
- if (tzOffsetMilliseconds != 0) {
- int tzOffsetMinutes = tzOffsetMilliseconds / (1000 * 60);
- int tzOffsetHours = tzOffsetMinutes / 60;
- tzOffsetMinutes -= tzOffsetHours * 60;
- if (tzOffsetMilliseconds > 0) {
- out.write("+");
- out.write(to2DigitString(tzOffsetHours));
- out.write(":");
- out.write(to2DigitString(tzOffsetMinutes));
- } else {
- out.write("-");
- out.write(to2DigitString(-tzOffsetHours));
- out.write(":");
- out.write(to2DigitString(-tzOffsetMinutes));
- }
- }
- return out.toString();
- }
- }
+// /**
+// * 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
+// */
+// public static String buildDateTime(Calendar cal, boolean useUTC) {
+//
+// if (useUTC)
+// return buildDateTimeUTC(cal);
+// else {
+// StringWriter out = new StringWriter();
+// out.write("" + cal.get(Calendar.YEAR));
+// out.write("-");
+// out.write(to2DigitString(cal.get(Calendar.MONTH) + 1));
+// out.write("-");
+// out.write(to2DigitString(cal.get(Calendar.DAY_OF_MONTH)));
+// out.write("T");
+// out.write(to2DigitString(cal.get(Calendar.HOUR_OF_DAY)));
+// out.write(":");
+// out.write(to2DigitString(cal.get(Calendar.MINUTE)));
+// out.write(":");
+// out.write(to2DigitString(cal.get(Calendar.SECOND)));
+// int tzOffsetMilliseconds =
+// cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET);
+// if (tzOffsetMilliseconds != 0) {
+// int tzOffsetMinutes = tzOffsetMilliseconds / (1000 * 60);
+// int tzOffsetHours = tzOffsetMinutes / 60;
+// tzOffsetMinutes -= tzOffsetHours * 60;
+// if (tzOffsetMilliseconds > 0) {
+// out.write("+");
+// out.write(to2DigitString(tzOffsetHours));
+// out.write(":");
+// out.write(to2DigitString(tzOffsetMinutes));
+// } else {
+// out.write("-");
+// out.write(to2DigitString(-tzOffsetHours));
+// out.write(":");
+// out.write(to2DigitString(-tzOffsetMinutes));
+// }
+// }
+// return out.toString();
+// }
+// }
/**
* Builds a <code>dateTime</code> value in UTC from a <code>Calendar</code> value.