Hi,
When performing HistorySets in a connector, how does the DateTime argument get interpreted?
Is the DateTime.Kind property considered, or does it see the value always as UTC or Local time?
If it considers the Kind property, how does it get interpreted when it is Unspecified?
Related documentation:
https://docs.dataminer.services/develop/devguide/Connector/Howto/How_to_use_history_sets_on_a_protocol_parameter.html#perform-the-history-sets
I tested all possible combinations.
Here are the results:
When DateTime.Kind is Local, it is properly handled as local server time.
When DateTime.Kind is Utc, it is properly handled as UTC.
When DateTime.Kind is Unspecified, it is handled as local server time.
Edit:
This is the behavior from 10.1.0 (CU18), 10.2.0 (CU6), 10.2.9 onwards.
Older DataMiner versions do not respect the Kind property of the DateTime and instead treat all timestamps as local time.
Edit:
Methods that do not have a DateTime timeInfo argument (like NotifyProtocol or AddRow) also do not respect the Kind property, even on later DataMiner versions.
So it is best to always use local time because it will always work regardless of version or method used.