aboutsummaryrefslogtreecommitdiff
path: root/CPP/Windows/TimeUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/Windows/TimeUtils.h')
-rw-r--r--CPP/Windows/TimeUtils.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/CPP/Windows/TimeUtils.h b/CPP/Windows/TimeUtils.h
new file mode 100644
index 0000000..d1d8c15
--- /dev/null
+++ b/CPP/Windows/TimeUtils.h
@@ -0,0 +1,32 @@
1// Windows/TimeUtils.h
2
3#ifndef __WINDOWS_TIME_UTILS_H
4#define __WINDOWS_TIME_UTILS_H
5
6#include "../Common/MyTypes.h"
7#include "../Common/MyWindows.h"
8
9namespace NWindows {
10namespace NTime {
11
12bool DosTimeToFileTime(UInt32 dosTime, FILETIME &fileTime) throw();
13bool FileTimeToDosTime(const FILETIME &fileTime, UInt32 &dosTime) throw();
14
15// UInt32 Unix Time : for dates 1970-2106
16UInt64 UnixTimeToFileTime64(UInt32 unixTime) throw();
17void UnixTimeToFileTime(UInt32 unixTime, FILETIME &fileTime) throw();
18
19// Int64 Unix Time : negative values for dates before 1970
20UInt64 UnixTime64ToFileTime64(Int64 unixTime) throw();
21bool UnixTime64ToFileTime(Int64 unixTime, FILETIME &fileTime) throw();
22
23bool FileTimeToUnixTime(const FILETIME &fileTime, UInt32 &unixTime) throw();
24Int64 FileTimeToUnixTime64(const FILETIME &ft) throw();
25
26bool GetSecondsSince1601(unsigned year, unsigned month, unsigned day,
27 unsigned hour, unsigned min, unsigned sec, UInt64 &resSeconds) throw();
28void GetCurUtcFileTime(FILETIME &ft) throw();
29
30}}
31
32#endif