- SYSTEMTIME st;
- st.wDay = dt.GetDay();
- st.wMonth = (WORD)(dt.GetMonth() + 1);
- st.wYear = (WORD)dt.GetYear();
- st.wHour = dt.GetHour();
- st.wMinute = dt.GetMinute();
- st.wSecond = dt.GetSecond();
- st.wMilliseconds = dt.GetMillisecond();
+ // Undo the conversions above.
+ wxLongLong t(dt.GetValue());
+ t += EPOCH_OFFSET_IN_MSEC;
+ t *= 10000;