fix doc example typo
[boost.git] / boost / date_time / local_time / conversion.hpp
blob66c6655d11e32cbb7a618ac6052c7c178df4624c
1 #ifndef DATE_TIME_LOCAL_TIME_CONVERSION_HPP__
2 #define DATE_TIME_LOCAL_TIME_CONVERSION_HPP__
4 /* Copyright (c) 2003-2004 CrystalClear Software, Inc.
5 * Subject to the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
7 * Author: Jeff Garland, Bart Garst
8 * $Date$
9 */
12 #include "boost/date_time/posix_time/conversion.hpp"
13 #include "boost/date_time/c_time.hpp"
14 #include "boost/date_time/local_time/local_date_time.hpp"
16 namespace boost {
17 namespace local_time {
19 //! Function that creates a tm struct from a local_date_time
20 inline
21 tm to_tm(const local_date_time& lt) {
22 tm lt_tm;
23 lt_tm = posix_time::to_tm(lt.local_time());
24 if(lt.is_dst()){
25 lt_tm.tm_isdst = 1;
27 else{
28 lt_tm.tm_isdst = 0;
30 return lt_tm;
34 }} // namespaces
35 #endif // DATE_TIME_LOCAL_TIME_CONVERSION_HPP__