AdjustSystemTimeToRtcTime 

ITcSystemServer::AdjustSystemTimeToRtcTime 

Method for adapting the Windows NT system time to the real-time clock of the PC.

HRESULT AdjustSystemTimeToRtcTime(
  [in,optional] VARIANT parm,
);

Parameters

parm

[in,optional]
Optional boolean value which determines whether the TwinCAT system time should also be adjusted. Parm equals TRUE means the TwinCAT system time will be adjusted, FALSE or no parameter means that only the Windows NT system time will be adjusted. If C++ is called, please note that the parameter transferred is of type VT_BOOL, and TRUE corresponds to the value 0xFFFF.

Return Values

HRESULT == S_OK

Adaptation executed successfully.

HRESULT == E_FAIL

Unable to execute start.

Comments

AdjustSystemTimeToRtcTime compares the real-time clock with the Windows NT system time and corrects the Windows NT system time by the difference. Time zones and summertime are considered. If the optional parameter contains TRUE, the TwinCAT system time will also be corrected. Please note that the correction can lead to time jumps during measurements or logbook entries.