0

I'm working in native C (not C++ - I'd like for everything to stay in C as much as possible) on the Windows API and I'm having trouble with dealing with/comparing UTC strings. Basically I'm getting a date from a WMI call, which as I understand it is a UTC number returned as a DWORD, and I'd like to take a human-readable date-time (i.e. 11:11:11 08/04/2014) and compare that to the UTC date I already have so I can programmatically say which comes before the other.

However it doesn't look like the Windows API provides a good API, and I tried to do it using sscanf_s and mktime similar to the second answer here. This gave me a number that seem close but wasn't quite correct. i.e. both will be today's date within a few minutes has the most significant 3-4 digits the same but nothing else is close.

Is this a timezone/local time problem? Or am I just missing something?

Community
  • 1
  • 1
Fewmitz
  • 487
  • 1
  • 5
  • 21

0 Answers0