Fix magic number explanation in filetime.cpp (dotnet/coreclr#10582)
authorAndrey Akinshin <andrey.akinshin@gmail.com>
Thu, 30 Mar 2017 13:25:42 +0000 (18:25 +0500)
committerJan Vorlicek <janvorli@microsoft.com>
Thu, 30 Mar 2017 13:25:42 +0000 (15:25 +0200)
89 * 366 + 280 * 365 equals to 134774 (not 134744)

Commit migrated from https://github.com/dotnet/coreclr/commit/44d4a46497a3a3e0881793c998f392a18dfe3a91

src/coreclr/src/pal/src/file/filetime.cpp

index 4e55e18..ca36e04 100644 (file)
@@ -81,8 +81,8 @@ SET_DEFAULT_DEBUG_CHANNEL(FILE);
    Both epochs are Gregorian. 1970 - 1601 = 369. Assuming a leap
    year every four years, 369 / 4 = 92. However, 1700, 1800, and 1900
    were NOT leap years, so 89 leap years, 280 non-leap years.
-   89 * 366 + 280 * 365 = 134744 days between epochs. Of course
-   60 * 60 * 24 = 86400 seconds per day, so 134744 * 86400 =
+   89 * 366 + 280 * 365 = 134774 days between epochs. Of course
+   60 * 60 * 24 = 86400 seconds per day, so 134774 * 86400 =
    11644473600 = SECS_BETWEEN_1601_AND_1970_EPOCHS.
    
    To 2001: