Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53622 - trunk/boost/date_time
From: andrey.semashev_at_[hidden]
Date: 2009-06-04 06:07:43


Author: andysem
Date: 2009-06-04 06:07:42 EDT (Thu, 04 Jun 2009)
New Revision: 53622
URL: http://svn.boost.org/trac/boost/changeset/53622

Log:
Fixes #2809.
Text files modified:
   trunk/boost/date_time/filetime_functions.hpp | 20 +++++++++-----------
   1 files changed, 9 insertions(+), 11 deletions(-)

Modified: trunk/boost/date_time/filetime_functions.hpp
==============================================================================
--- trunk/boost/date_time/filetime_functions.hpp (original)
+++ trunk/boost/date_time/filetime_functions.hpp 2009-06-04 06:07:42 EDT (Thu, 04 Jun 2009)
@@ -10,7 +10,7 @@
  */
 
 /*! @file filetime_functions.hpp
- * Function(s) for converting between a FILETIME structure and a
+ * Function(s) for converting between a FILETIME structure and a
  * time object. This file is only available on systems that have
  * BOOST_HAS_FTIME defined.
  */
@@ -51,13 +51,13 @@
             boost::uint16_t wHour;
             boost::uint16_t wMinute;
             boost::uint16_t wSecond;
- boost::uint16_t wMilliseconds;
+ boost::uint16_t wMilliseconds;
         };
 
- __declspec(dllimport) void __stdcall GetSystemTimeAsFileTime(FILETIME* lpFileTime);
- __declspec(dllimport) int __stdcall FileTimeToLocalFileTime(const FILETIME* lpFileTime, FILETIME* lpLocalFileTime);
- __declspec(dllimport) void __stdcall GetSystemTime(SYSTEMTIME* lpSystemTime);
- __declspec(dllimport) int __stdcall SystemTimeToFileTime(const SYSTEMTIME* lpSystemTime, FILETIME* lpFileTime);
+ __declspec(dllimport) void __stdcall GetSystemTimeAsFileTime(FILETIME* lpFileTime);
+ __declspec(dllimport) int __stdcall FileTimeToLocalFileTime(const FILETIME* lpFileTime, FILETIME* lpLocalFileTime);
+ __declspec(dllimport) void __stdcall GetSystemTime(SYSTEMTIME* lpSystemTime);
+ __declspec(dllimport) int __stdcall SystemTimeToFileTime(const SYSTEMTIME* lpSystemTime, FILETIME* lpFileTime);
 
     } // extern "C"
 
@@ -96,9 +96,7 @@
     {
         /* shift is difference between 1970-Jan-01 & 1601-Jan-01
         * in 100-nanosecond intervals */
- const uint64_t c1 = 27111902UL;
- const uint64_t c2 = 3577643008UL; // issues warning without 'UL'
- const uint64_t shift = (c1 << 32) + c2;
+ const uint64_t shift = 116444736000000000ULL; // (27111902 << 32) + 3577643008
 
         union {
             FileTimeT as_file_time;
@@ -115,8 +113,8 @@
 //! Create a time object from an initialized FILETIME struct.
 /*!
  * Create a time object from an initialized FILETIME struct.
- * A FILETIME struct holds 100-nanosecond units (0.0000001). When
- * built with microsecond resolution the file_time's sub second value
+ * A FILETIME struct holds 100-nanosecond units (0.0000001). When
+ * built with microsecond resolution the file_time's sub second value
  * will be truncated. Nanosecond resolution has no truncation.
  *
  * \note The function is templated on the FILETIME type, so that


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk