/usr/include/boost/date_time
NameSizeModeActions
gregorian/-0755rm
local_time/-0755rm
posix_time/-0755rm
adjust_functors.hpp54670644editdlrm
compiler_config.hpp56400644editdlrm
constrained_value.hpp42240644editdlrm
c_local_time_adjustor.hpp26310644editdlrm
c_time.hpp44960644editdlrm
date.hpp73570644editdlrm
date_clock_device.hpp22990644editdlrm
date_defs.hpp7010644editdlrm
date_duration.hpp46690644editdlrm
date_duration_types.hpp91860644editdlrm
date_facet.hpp293140644editdlrm
date_formatting.hpp42080644editdlrm
date_formatting_limited.hpp34610644editdlrm
date_formatting_locales.hpp67480644editdlrm
date_format_simple.hpp31280644editdlrm
date_generators.hpp165080644editdlrm
date_generator_formatter.hpp117150644editdlrm
date_generator_parser.hpp130640644editdlrm
date_iterator.hpp33050644editdlrm
date_names_put.hpp107540644editdlrm
date_parsing.hpp141460644editdlrm
dst_rules.hpp154010644editdlrm
dst_transition_generators.hpp22930644editdlrm
filetime_functions.hpp31630644editdlrm
find_match.hpp13550644editdlrm
format_date_parser.hpp239090644editdlrm
gregorian_calendar.hpp27140644editdlrm
gregorian_calendar.ipp79470644editdlrm
int_adapter.hpp144630644editdlrm
iso_format.hpp56400644editdlrm
locale_config.hpp12060644editdlrm
local_timezone_defs.hpp76180644editdlrm
local_time_adjustor.hpp85780644editdlrm
microsec_time_clock.hpp62570644editdlrm
parse_format_base.hpp9610644editdlrm
period.hpp119360644editdlrm
period_formatter.hpp72370644editdlrm
period_parser.hpp79320644editdlrm
special_defs.hpp6330644editdlrm
special_values_formatter.hpp36570644editdlrm
special_values_parser.hpp61610644editdlrm
strings_from_facet.hpp45050644editdlrm
string_convert.hpp10020644editdlrm
string_parse_tree.hpp84050644editdlrm
time.hpp67880644editdlrm
time_clock.hpp22450644editdlrm
time_defs.hpp9420644editdlrm
time_duration.hpp105690644editdlrm
time_facet.hpp589880644editdlrm
time_formatting_streams.hpp37520644editdlrm
time_iterator.hpp14380644editdlrm
time_parsing.hpp118460644editdlrm
time_resolution_traits.hpp67600644editdlrm
time_system_counted.hpp90510644editdlrm
time_system_split.hpp80770644editdlrm
time_zone_base.hpp37110644editdlrm
time_zone_names.hpp31030644editdlrm
tz_db_base.hpp159150644editdlrm
wrapping_int.hpp58240644editdlrm
year_month_day.hpp13750644editdlrm
Edit: /usr/include/boost/date_time/filetime_functions.hpp (3163B)
#ifndef DATE_TIME_FILETIME_FUNCTIONS_HPP__ #define DATE_TIME_FILETIME_FUNCTIONS_HPP__ /* Copyright (c) 2004 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date$ */ /*! @file filetime_functions.hpp * 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. */ #include #if defined(BOOST_HAS_FTIME) // skip this file if no FILETIME #include #include #include namespace boost { namespace date_time { //! 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 * will be truncated. Nanosecond resolution has no truncation. * * \note The function is templated on the FILETIME type, so that * it can be used with both native FILETIME and the ad-hoc * boost::detail::winapi::FILETIME_ type. */ template< typename TimeT, typename FileTimeT > inline TimeT time_from_ftime(const FileTimeT& ft) { typedef typename TimeT::date_type date_type; typedef typename TimeT::date_duration_type date_duration_type; typedef typename TimeT::time_duration_type time_duration_type; // https://svn.boost.org/trac/boost/ticket/2523 // Since this function can be called with arbitrary times, including ones that // are before 1970-Jan-01, we'll have to cast the time a bit differently, // than it is done in the microsec_clock::file_time_to_microseconds function. This allows to // avoid integer wrapping for dates before 1970-Jan-01. // 100-nanos since 1601-Jan-01 uint64_t ft_as_integer = (static_cast< uint64_t >(ft.dwHighDateTime) << 32) | static_cast< uint64_t >(ft.dwLowDateTime); uint64_t sec = ft_as_integer / 10000000UL; uint32_t sub_sec = static_cast< uint32_t >(ft_as_integer % 10000000UL) // 100-nanoseconds since the last second #if !defined(BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG) / 10U; // microseconds since the last second #else * 100U; // nanoseconds since the last second #endif // split sec into usable chunks: days, hours, minutes, & seconds const uint32_t sec_per_day = 86400; // seconds per day uint32_t days = static_cast< uint32_t >(sec / sec_per_day); uint32_t tmp = static_cast< uint32_t >(sec % sec_per_day); uint32_t hours = tmp / 3600; // sec_per_hour tmp %= 3600; uint32_t minutes = tmp / 60; // sec_per_min tmp %= 60; uint32_t seconds = tmp; // seconds date_duration_type dd(days); date_type d = date_type(1601, Jan, 01) + dd; return TimeT(d, time_duration_type(hours, minutes, seconds, sub_sec)); } }} // boost::date_time #endif // BOOST_HAS_FTIME #endif // DATE_TIME_FILETIME_FUNCTIONS_HPP__