From fa30b5b2a26a6df4e56a81283761c35ef81770e3 Mon Sep 17 00:00:00 2001 From: kstranacher Date: Tue, 13 Jul 2010 06:25:09 +0000 Subject: git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1166 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../at/gv/egovernment/moa/util/DateTimeUtils.java | 31 ++++++++++++++++++++++ .../java/at/gv/egovernment/moa/util/SSLUtils.java | 3 +-- 2 files changed, 32 insertions(+), 2 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 5f31809dd..88133832a 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 @@ -73,6 +73,37 @@ public class DateTimeUtils { return out.toString(); } + /** + * Builds a dateTime value from a Calendar value. + * @param cal the Calendar value + * @return the dateTime value + */ + public static String buildDate(Calendar cal) { + 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))); + return out.toString(); + } + + /** + * Builds a dateTime value from a Calendar value. + * @param cal the Calendar value + * @return the dateTime value + */ + public static String buildTime(Calendar cal) { + StringWriter out = new StringWriter(); + 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))); + + return out.toString(); + } + /** * Converts month, day, hour, minute, or second value * to a 2 digit String. diff --git a/common/src/main/java/at/gv/egovernment/moa/util/SSLUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/SSLUtils.java index 6d6aedb22..a7937b1bd 100644 --- a/common/src/main/java/at/gv/egovernment/moa/util/SSLUtils.java +++ b/common/src/main/java/at/gv/egovernment/moa/util/SSLUtils.java @@ -110,8 +110,7 @@ public class SSLUtils { String clientKeyStorePassword) throws IOException, GeneralSecurityException { - //System.setProperty("javax.net.debug", "all"); - TrustManager[] tms = getTrustManagers(trustStore); + TrustManager[] tms = getTrustManagers(trustStore); KeyManager[] kms = getKeyManagers(clientKeyStoreType, clientKeyStoreURL, clientKeyStorePassword); SSLContext ctx = SSLContext.getInstance("TLS"); ctx.init(kms, tms, null); -- cgit v1.2.3