Good afternoon.
I noticed a difference between the timestamp informed by QuickOPC.NET and informed by my computer.
I'm referencing the example provided in the log database with multiple items using SubscribeMultipleItems.
int[] handleTeste1 = EasyDAClient.DefaultInstance.SubscribeMultipleItems(
new[]
{
new DAItemGroupArguments("", "CoDeSys.OPC.02", ".Teste1", 60000, null),
new DAItemGroupArguments("", "CoDeSys.OPC.02", ".Teste2", 60000, null),
new DAItemGroupArguments("", "CoDeSys.OPC.02", ".Teste3", 60000, null),
new DAItemGroupArguments("", "CoDeSys.OPC.02", ".Teste4", 60000, null),
},
(_, eventArgs) =>
{
Console.Write(".");
if (eventArgs.Vtq != null)
{
tableTeste1.Rows.Clear();
DataRow row = tableTeste1.NewRow();
row["ItemID"] = eventArgs.ItemDescriptor.ItemId;
row["Value"] = eventArgs.Vtq.Value;
row["Timestamp"] = (eventArgs.Vtq.Timestamp < (DateTime)SqlDateTime.MinValue)
? (DateTime)SqlDateTime.MinValue
: eventArgs.Vtq.Timestamp;
row["Quality"] = (short)eventArgs.Vtq.Quality;
tableTeste1.Rows.Add(row);
adapterTeste1.Update(dataSetTeste1, "TB_Teste1");
}
}
);
I believe this is referencing QuickOPC.NET the time zone (UTC), but my timezone is (UTC - 3:00) Brasilia. I have a difference of 3 hours in my logs from the database.
How could I set this timestamp to my time zone (UTC - 3:00) Brasilia?
Thank you.