Exemplo n.º 1
0
void DateTime::toUtcSystemTime(LPSYSTEMTIME st) const
{
  FILETIME ft;

  toFileTime(&ft);

  FileTimeToSystemTime(&ft, st);
}
Exemplo n.º 2
0
void DateTime::toLocalSystemTime(LPSYSTEMTIME st) const
{
  FILETIME ft, localFt;

  toFileTime(&ft);
  // Convert file time from UTC format to local.
  FileTimeToLocalFileTime(&ft, &localFt);

  FileTimeToSystemTime(&localFt, st);
}
Exemplo n.º 3
0
 // Conver to OpcUa_DateTime
 // =============================================================================================
 void DateTime::toSdk(OpcUa_DateTime* uaDateTime) const
 {
     uint64_t t = toFileTime();
     uaDateTime->dwLowDateTime = (OpcUa_UInt32)(t & 0xFFFFFFFF);
     uaDateTime->dwHighDateTime = (OpcUa_UInt32)(t >> 32);
 }