Skip to content

Commit d1c346a

Browse files
committed
chrono: correct the units for the epoch bias
As pointed out by Howard, this is actually 134774 days (* 24 * 3600), and therefore seconds, not 100ns units. Adjust the units to reflect reality. llvm-svn: 290824
1 parent 8bcade5 commit d1c346a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libcxx/src/chrono.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ system_clock::now() _NOEXCEPT
5353
nanoseconds::period>>;
5454

5555
// The Windows epoch is Jan 1 1601, the Unix epoch Jan 1 1970.
56-
static _LIBCPP_CONSTEXPR const filetime_duration
57-
nt_to_unix_epoch{11644473600};
56+
static _LIBCPP_CONSTEXPR const seconds nt_to_unix_epoch{11644473600};
5857

5958
FILETIME ft;
6059
#if _WIN32_WINNT >= _WIN32_WINNT_WIN8

0 commit comments

Comments
 (0)