rossmann-engineering / EasyModbusTCP.NET

Modbus TCP, Modbus UDP and Modbus RTU client/server library for .NET implementations
928 stars 402 forks source link

Do not compare timespans with DateTime.Now #28

Open cMurschall opened 5 years ago

cMurschall commented 5 years ago

I noticed, that you compare time spans you created using DateTime.Now.

Here is an example. This can wreak havoc if the code is running in an area that observes DST (Daylight Saving Time). You should change it to DateTime.UtcNow.