From 7625168308b648dab99db5c99c9de09b173ed05c Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 18 Sep 2013 10:05:01 +0200 Subject: change to 1.9.96-snapshot --set SL-Version to hardcoded version 1.2 --add "RemoveBPK form AuthBlock" feature --set UTC time as default (SAML1) --add PVP2 Attributes: ++ AuthBlock ++ Certificate ++ BASEID ++ BASEID-TYPE ++BKUURL Bugfix: -- NullPointerException: GetMISSessionIDServlet.java -- Check if it is empty: MOAMetadataProvider.java --- .../at/gv/egovernment/moa/util/DateTimeUtils.java | 86 +++++++++++----------- 1 file changed, 43 insertions(+), 43 deletions(-) (limited to 'common/src/main/java/at') 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 dateTime value from a Calendar value. - * @param cal the Calendar value - * @return the dateTime 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 dateTime value from a Calendar value. +// * @param cal the Calendar value +// * @return the dateTime 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 dateTime value in UTC from a Calendar value. -- cgit v1.2.3