ocpp 0.24.1
A C++ implementation of the Open Charge Point Protocol
Public Member Functions | List of all members
ocpp::DateTime Class Reference

Contains a DateTime implementation that can parse and create RFC 3339 compatible strings. More...

#include <types.hpp>

Inheritance diagram for ocpp::DateTime:
ocpp::DateTimeImpl

Public Member Functions

 DateTime ()
 Creates a new DateTime object with the current system time.
 
 DateTime (std::chrono::time_point< date::utc_clock > timepoint)
 Creates a new DateTime object from the given timepoint.
 
 DateTime (const std::string &timepoint_str)
 Creates a new DateTime object from the given timepoint_str.
 
- Public Member Functions inherited from ocpp::DateTimeImpl
 DateTimeImpl ()
 Creates a new DateTimeImpl object with the current utc time.
 
 DateTimeImpl (std::chrono::time_point< date::utc_clock > timepoint)
 Creates a new DateTimeImpl object from the given timepoint.
 
 DateTimeImpl (const std::string &timepoint_str)
 Creates a new DateTimeImpl object from the given timepoint_str.
 
std::string to_rfc3339 () const
 Converts this DateTimeImpl to a RFC 3339 compatible string. More...
 
void from_rfc3339 (const std::string &timepoint_str)
 Sets the timepoint of this DateTimeImpl to the given timepoint_str.
 
std::chrono::time_point< date::utc_clock > to_time_point () const
 Converts this DateTimeImpl to a std::chrono::time_point. More...
 
DateTimeImploperator= (const DateTimeImpl &dt)
 Assignment operator= to assign another DateTimeImpl dt to this DateTimeImpl.
 
 operator std::string ()
 Conversion operatpr std::string returns a RFC 3339 compatible string representation of the stored DateTime.
 

Detailed Description

Contains a DateTime implementation that can parse and create RFC 3339 compatible strings.


The documentation for this class was generated from the following files: