Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/date_time/local_time/conversion.hpp @ 133:4acb5d8d80b6 tip
Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author | Chris Cannam |
---|---|
date | Tue, 30 Jul 2019 12:25:44 +0100 |
parents | c530137014c0 |
children |
rev | line source |
---|---|
Chris@16 | 1 #ifndef DATE_TIME_LOCAL_TIME_CONVERSION_HPP__ |
Chris@16 | 2 #define DATE_TIME_LOCAL_TIME_CONVERSION_HPP__ |
Chris@16 | 3 |
Chris@16 | 4 /* Copyright (c) 2003-2004 CrystalClear Software, Inc. |
Chris@16 | 5 * Subject to the Boost Software License, Version 1.0. |
Chris@16 | 6 * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) |
Chris@16 | 7 * Author: Jeff Garland, Bart Garst |
Chris@101 | 8 * $Date$ |
Chris@16 | 9 */ |
Chris@16 | 10 |
Chris@16 | 11 |
Chris@16 | 12 #include "boost/date_time/posix_time/conversion.hpp" |
Chris@16 | 13 #include "boost/date_time/c_time.hpp" |
Chris@16 | 14 #include "boost/date_time/local_time/local_date_time.hpp" |
Chris@16 | 15 |
Chris@16 | 16 namespace boost { |
Chris@16 | 17 namespace local_time { |
Chris@16 | 18 |
Chris@16 | 19 //! Function that creates a tm struct from a local_date_time |
Chris@16 | 20 inline |
Chris@16 | 21 std::tm to_tm(const local_date_time& lt) { |
Chris@16 | 22 std::tm lt_tm = posix_time::to_tm(lt.local_time()); |
Chris@16 | 23 if(lt.is_dst()){ |
Chris@16 | 24 lt_tm.tm_isdst = 1; |
Chris@16 | 25 } |
Chris@16 | 26 else{ |
Chris@16 | 27 lt_tm.tm_isdst = 0; |
Chris@16 | 28 } |
Chris@16 | 29 return lt_tm; |
Chris@16 | 30 } |
Chris@16 | 31 |
Chris@16 | 32 |
Chris@16 | 33 }} // namespaces |
Chris@16 | 34 #endif // DATE_TIME_LOCAL_TIME_CONVERSION_HPP__ |