fix: datetime format (issue #36)

This commit is contained in:
Flavio Pompermaier
2024-12-19 10:48:19 +01:00
committed by GitHub
parent 9a5f589bb9
commit fd31ec76bd

View File

@@ -143,7 +143,7 @@ public class SimpleSecurityHandler implements SOAPHandler<SOAPMessageContext> {
}
public String getUTCTime() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-d'T'HH:mm:ss'Z'");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
sdf.setTimeZone(new SimpleTimeZone(SimpleTimeZone.UTC_TIME, "UTC"));
Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
String utcTime = sdf.format(cal.getTime());