aboutsummaryrefslogtreecommitdiff
path: root/CPP/Windows/TimeUtils.h
diff options
context:
space:
mode:
authorIgor Pavlov <87184205+ip7z@users.noreply.github.com>2021-12-27 00:00:00 +0000
committerIgor Pavlov <87184205+ip7z@users.noreply.github.com>2022-03-18 15:35:13 +0500
commitf19f813537c7aea1c20749c914e756b54a9c3cf5 (patch)
tree816ba62ca7c0fa19f2eb46d9e9d6f7dd7c3a744d /CPP/Windows/TimeUtils.h
parent98e06a519b63b81986abe76d28887f6984a7732b (diff)
download7zip-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.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