#include <Asn1Codec.h>
|
static std::unique_ptr< Asn1Record > | decode (const uint8_t *data, size_t dataLen, bool lazy=true) |
|
An abstract class for representing ASN.1 time records (UTCTime and GeneralizedTime). This class is not instantiable, users should use either Asn1UtcTimeRecord or Asn1GeneralizedTimeRecord
◆ getValue()
std::chrono::system_clock::time_point pcpp::Asn1TimeRecord::getValue |
( |
const std::string & |
timezone = "Z" | ) |
|
|
inline |
- Parameters
-
[in] | timezone | A timezone string - should be in the format of "Z" for UTC or +=HHMM for other timezones. The default value is UTC |
- Returns
- The time-point value of this record
- Exceptions
-
std::invalid_argument | if timezone is not in the correct format |
◆ getValueAsString()
std::string pcpp::Asn1TimeRecord::getValueAsString |
( |
const std::string & |
format = "%Y-%m-%d %H:%M:%S" , |
|
|
const std::string & |
timezone = "Z" , |
|
|
bool |
includeMilliseconds = false |
|
) |
| |
- Parameters
-
[in] | format | Requested value format |
[in] | timezone | A timezone string - should be in the format of "Z" for UTC or +=HHMM for other timezones. The default value is UTC |
[in] | includeMilliseconds | Should Include milliseconds in the returned string |
- Returns
- The value as string
- Exceptions
-
std::invalid_argument | if timezone is not in the correct format |