7 #ifndef HTTP_DATE_TIME_H 8 #define HTTP_DATE_TIME_H 11 #include <boost/date_time/posix_time/posix_time.hpp> 53 explicit HttpDateTime(
const boost::posix_time::ptime& t);
67 std::string rfc1123Format()
const;
73 std::string rfc850Format()
const;
80 std::string asctimeFormat()
const;
89 static HttpDateTime fromRfc1123(
const std::string& time_string);
98 static HttpDateTime fromRfc850(
const std::string& time_string);
107 static HttpDateTime fromAsctime(
const std::string& time_string);
122 static HttpDateTime fromAny(
const std::string& time_string);
130 std::string toString(
const std::string&
format,
131 const std::string& method_name)
const;
149 static boost::posix_time::ptime
150 fromString(
const std::string& time_string,
const std::string& format,
151 const std::string& method_name,
const bool zone_check =
true);
154 boost::posix_time::ptime time_;
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
boost::posix_time::ptime getPtime() const
Returns time encapsulated by this class.
This class parses and generates time values used in HTTP.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-lfc.
Exception thrown when there is an error during time conversion.
std::string format(const std::string &format, const std::vector< std::string > &args)
Apply Formatting.
HttpTimeConversionError(const char *file, size_t line, const char *what)