1 // Windows/TimeUtils.h 2 3 #ifndef __WINDOWS_TIME_UTILS_H 4 #define __WINDOWS_TIME_UTILS_H 5 6 #include "../Common/MyTypes.h" 7 8 namespace NWindows { 9 namespace NTime { 10 11 bool DosTimeToFileTime(UInt32 dosTime, FILETIME &fileTime) throw(); 12 bool FileTimeToDosTime(const FILETIME &fileTime, UInt32 &dosTime) throw(); 13 void UnixTimeToFileTime(UInt32 unixTime, FILETIME &fileTime) throw(); 14 bool UnixTime64ToFileTime(Int64 unixTime, FILETIME &fileTime) throw(); 15 bool FileTimeToUnixTime(const FILETIME &fileTime, UInt32 &unixTime) throw(); 16 Int64 FileTimeToUnixTime64(const FILETIME &ft) throw(); 17 bool GetSecondsSince1601(unsigned year, unsigned month, unsigned day, 18 unsigned hour, unsigned min, unsigned sec, UInt64 &resSeconds) throw(); 19 void GetCurUtcFileTime(FILETIME &ft) throw(); 20 21 }} 22 23 #endif 24