diff options
author | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2021-12-27 00:00:00 +0000 |
---|---|---|
committer | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2022-03-18 15:35:13 +0500 |
commit | f19f813537c7aea1c20749c914e756b54a9c3cf5 (patch) | |
tree | 816ba62ca7c0fa19f2eb46d9e9d6f7dd7c3a744d /CPP/Windows/TimeUtils.h | |
parent | 98e06a519b63b81986abe76d28887f6984a7732b (diff) | |
download | 7zip-21.07.tar.gz 7zip-21.07.tar.bz2 7zip-21.07.zip |
'21.07'21.07
Diffstat (limited to 'CPP/Windows/TimeUtils.h')
-rw-r--r-- | CPP/Windows/TimeUtils.h | 32 |
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 | |||
9 | namespace NWindows { | ||
10 | namespace NTime { | ||
11 | |||
12 | bool DosTimeToFileTime(UInt32 dosTime, FILETIME &fileTime) throw(); | ||
13 | bool FileTimeToDosTime(const FILETIME &fileTime, UInt32 &dosTime) throw(); | ||
14 | |||
15 | // UInt32 Unix Time : for dates 1970-2106 | ||
16 | UInt64 UnixTimeToFileTime64(UInt32 unixTime) throw(); | ||
17 | void UnixTimeToFileTime(UInt32 unixTime, FILETIME &fileTime) throw(); | ||
18 | |||
19 | // Int64 Unix Time : negative values for dates before 1970 | ||
20 | UInt64 UnixTime64ToFileTime64(Int64 unixTime) throw(); | ||
21 | bool UnixTime64ToFileTime(Int64 unixTime, FILETIME &fileTime) throw(); | ||
22 | |||
23 | bool FileTimeToUnixTime(const FILETIME &fileTime, UInt32 &unixTime) throw(); | ||
24 | Int64 FileTimeToUnixTime64(const FILETIME &ft) throw(); | ||
25 | |||
26 | bool GetSecondsSince1601(unsigned year, unsigned month, unsigned day, | ||
27 | unsigned hour, unsigned min, unsigned sec, UInt64 &resSeconds) throw(); | ||
28 | void GetCurUtcFileTime(FILETIME &ft) throw(); | ||
29 | |||
30 | }} | ||
31 | |||
32 | #endif | ||