File indexing completed on 2025-01-18 09:30:35
0001 #ifndef DATE_TIME_LOCAL_TIME_CONVERSION_HPP__
0002 #define DATE_TIME_LOCAL_TIME_CONVERSION_HPP__
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "boost/date_time/posix_time/conversion.hpp"
0013 #include "boost/date_time/c_time.hpp"
0014 #include "boost/date_time/local_time/local_date_time.hpp"
0015
0016 namespace boost {
0017 namespace local_time {
0018
0019
0020 inline
0021 std::tm to_tm(const local_date_time& lt) {
0022 std::tm lt_tm = posix_time::to_tm(lt.local_time());
0023 if(lt.is_dst()){
0024 lt_tm.tm_isdst = 1;
0025 }
0026 else{
0027 lt_tm.tm_isdst = 0;
0028 }
0029 return lt_tm;
0030 }
0031
0032
0033 }}
0034 #endif