I have date strings such as 2009-02-28 15:40:05 AEDST and want to convert it into SYSTEMTIME structure. So far I have:
SYSTEMTIME st;
FILETIME ft;
SecureZeroMemory(&st, sizeof(st));
sscanf_s(contents, "%u-%u-%u %u:%u:%u",
&st.wYear,
&st.wMonth,
&st.wDay,
&st.wHour,
&st.wMinute,
&st.wSecond);
// Timezone correction
SystemTimeToFileTime(&st, &ft);
LocalFileTimeToFileTime(&ft, &ft);
FileTimeToSystemTime(&ft, &st);
However my local timezone is not AEDST. So I need to be able to specify the timezone when converting to UTC.