mirror of
https://gitcode.com/gh_mirrors/on/onvif.git
synced 2025-12-30 05:22:27 +00:00
fix: datetime format (issue #36)
This commit is contained in:
committed by
GitHub
parent
9a5f589bb9
commit
fd31ec76bd
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user