Add support for serializing IEC date

This commit is contained in:
Dawid Pągowski
2023-08-23 01:04:23 +02:00
parent 689e7ffd96
commit e4cc42fa51

View File

@@ -26,6 +26,11 @@ namespace S7.Net.Protocol
_ => Types.String.ToByteArray(s, dataItem.Count)
};
if (dataItem.VarType == VarType.Date)
{
return Date.ToByteArray((System.DateTime)dataItem.Value);
}
return SerializeValue(dataItem.Value);
}