mirror of
https://github.com/S7NetPlus/s7netplus.git
synced 2026-02-17 22:38:27 +08:00
Add support for serializing IEC date
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user