PcapPlusPlus  Next
pcpp::Asn1UtcTimeRecord Class Reference

#include <Asn1Codec.h>

Inheritance diagram for pcpp::Asn1UtcTimeRecord:
pcpp::Asn1TimeRecord pcpp::Asn1PrimitiveRecord pcpp::Asn1Record

Public Member Functions

 Asn1UtcTimeRecord (const std::chrono::system_clock::time_point &value, bool withSeconds=true)
 
- Public Member Functions inherited from pcpp::Asn1TimeRecord
std::chrono::system_clock::time_point getValue (const std::string &timezone="Z")
 
std::string getValueAsString (const std::string &format="%Y-%m-%d %H:%M:%S", const std::string &timezone="Z", bool includeMilliseconds=false)
 
- Public Member Functions inherited from pcpp::Asn1Record
std::vector< uint8_t > encode ()
 
Asn1TagClass getTagClass () const
 
bool isConstructed () const
 
Asn1UniversalTagType getUniversalTagType () const
 
uint8_t getTagType () const
 
size_t getValueLength () const
 
size_t getTotalLength () const
 
std::string toString ()
 
template<class Asn1RecordType >
Asn1RecordType * castAs ()
 

Additional Inherited Members

- Static Public Member Functions inherited from pcpp::Asn1Record
static std::unique_ptr< Asn1Recorddecode (const uint8_t *data, size_t dataLen, bool lazy=true)
 

Detailed Description

Represents an ASN.1 record with a value of type UTCTime

Constructor & Destructor Documentation

◆ Asn1UtcTimeRecord()

pcpp::Asn1UtcTimeRecord::Asn1UtcTimeRecord ( const std::chrono::system_clock::time_point &  value,
bool  withSeconds = true 
)
explicit

A constructor to create a record of type UTC time

Parameters
[in]valueA time-point to set as the record value
[in]withSecondsShould write the ASN.1 record with second precision. The default is true