package eu.europa.esig.dss.jaxb.parsers;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class DateParser {

	private static final Logger logger = LoggerFactory.getLogger(DateParser.class);

	private static final String DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss";// "dd/MM/yyyy HH:mm:ss";

	public static Date parse(String v) {
		try {
			SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
			sdf.setLenient(false);
			return sdf.parse(v);
		} catch (Exception e) {
			logger.warn("Unable to parse '" + v + "'");
		}
		return null;
	}

	public static String print(Date v) {
		if (v != null) {
			SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
			return sdf.format(v);
		}
		return null;
	}

}

@@ -92,16 +92,43 @@
 il.Date;
+%0Aimport java.util.TimeZone;
 %0A%0Aimport
@@ -359,32 +359,74 @@
 ss%22;
-// %22dd/MM/yyyy HH:mm:ss%22
+%0A%0A%09private static final TimeZone UTC = TimeZone.getTimeZone(%22UTC%22)
 ;%0A%0A%09
@@ -531,16 +531,41 @@
 ORMAT);%0A
+%09%09%09sdf.setTimeZone(UTC);%0A
 %09%09%09sdf.s
@@ -759,16 +759,16 @@
 null) %7B%0A
-
 %09%09%09Simpl
@@ -820,16 +820,41 @@
 ORMAT);%0A
+%09%09%09sdf.setTimeZone(UTC);%0A
 %09%09%09retur

Use UTC