Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit dfe90e73 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

use different option for xml date/time converstion to get local time

parent 6ff78f35
Branches
Tags
No related merge requests found
......@@ -115,7 +115,7 @@ namespace HashingTool.Helper
hashedXML.DigestValueRead = h.ReadHash();
var dateNode = xml.SelectSingleNode("//*[local-name()='Date']");
hashedXML.Date = dateNode != null
? XmlConvert.ToDateTime(dateNode.InnerText, XmlDateTimeSerializationMode.RoundtripKind)
? XmlConvert.ToDateTime(dateNode.InnerText, XmlDateTimeSerializationMode.Local)
: (DateTime?)null;
} catch {
hashedXML.DigestValueRead = "";
......
......@@ -100,7 +100,7 @@ namespace HashingTool.ViewModel.UserControl
if (nodes == null || nodes.Count == 0) {
return null;
}
return XmlConvert.ToDateTime(nodes[0].InnerText, XmlDateTimeSerializationMode.RoundtripKind);
return XmlConvert.ToDateTime(nodes[0].InnerText, XmlDateTimeSerializationMode.Local);
}
private string DoReadVIN()
......
......@@ -328,7 +328,7 @@ namespace TUGraz.VectoHashing
public DateTime GetCertificationDate(VectoComponents component, int idx)
{
var nodes = GetNodes(component, idx);
return XmlConvert.ToDateTime(ReadElementValue(nodes[idx], XMLNames.Component_Date), XmlDateTimeSerializationMode.RoundtripKind);
return XmlConvert.ToDateTime(ReadElementValue(nodes[idx], XMLNames.Component_Date), XmlDateTimeSerializationMode.Local);
}
private string ReadElementValue(XmlNode xmlNode, string elementName)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment