libpniio
nxdate_time.hpp
Go to the documentation of this file.
1 //
2 // (c) Copyright 2011 DESY, Eugen Wintersberger <eugen.wintersberger@desy.de>
3 //
4 // This file is part of libpniio.
5 //
6 // libpniio is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // libpniio is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with libpniio. If not, see <http://www.gnu.org/licenses/>.
18 // ===========================================================================
19 // Created on: Nov 17, 2011
20 // Author: Eugen Wintersberger
21 //
22 
23 #pragma once
24 
25 #include <ctime>
26 #include <boost/date_time/posix_time/posix_time.hpp>
27 #include <pni/core/types.hpp>
28 
29 namespace pni {
30 namespace io {
31 namespace nx {
32 
33 
45  class nxdate_time
46  {
47  private:
49  static pni::core::string __get_date_time_str(const boost::posix_time::ptime &t);
51  static pni::core::string __get_utc_delta();
52  public:
53  //-----------------------------------------------------------------
62  static pni::core::string get_date_time_str();
63 
64  //-----------------------------------------------------------------
74  static pni::core::string get_date_time_str(const time_t &t);
75  };
76 
77 //end of namepsace
78 }
79 }
80 }
static pni::core::string __get_date_time_str(const boost::posix_time::ptime &t)
get date time from ptime
Definition: nxdate_time.cpp:56
date time factory
Definition: nxdate_time.hpp:45
static pni::core::string get_date_time_str()
date-time now
Definition: nxdate_time.cpp:65
Definition: cbf_reader.hpp:41
static pni::core::string __get_utc_delta()
get delta to UTC as a string
Definition: nxdate_time.cpp:34