#include <PKIFTime.h>
TSP-enforcing: Yes
Definition at line 60 of file PKIFTime.h.
Public Member Functions | |
CPKIFTime () | |
CPKIFTime (const CPKIFTime &time_) | |
CPKIFTime (const char *time, TimeType type) | |
CPKIFTime (const char *time) | |
~CPKIFTime () | |
int | year () const |
int | month () const |
int | dayOfMonth () const |
int | hours () const |
int | minutes () const |
int | seconds () const |
const char * | GetTime () const |
void | set (int year_, int month_, int dom_, int hours_, int minutes_, int seconds_) |
CPKIFTime & | operator= (const CPKIFTime &time_) |
CPKIFTime & | operator+= (const CPKIFDuration &duration_) |
CPKIFTime & | operator-= (const CPKIFDuration &duration_) |
CPKIFTime | operator+ (const CPKIFDuration &duration_) const |
CPKIFTime | operator- (const CPKIFDuration &duration_) const |
CPKIFDuration | operator- (const CPKIFTime &time_) const |
bool | operator== (const CPKIFTime &time_) const |
bool | operator!= (const CPKIFTime &time_) const |
bool | operator< (const CPKIFTime &time_) const |
bool | operator<= (const CPKIFTime &time_) const |
bool | operator> (const CPKIFTime &time_) const |
bool | operator>= (const CPKIFTime &time_) const |
Static Public Member Functions | |
static CPKIFTimePtr | CurrentTime () |
CPKIFTime::CPKIFTime | ( | ) |
CPKIFTime::CPKIFTime | ( | const CPKIFTime & | date_ | ) |
CPKIFTime::CPKIFTime | ( | const char * | time, | |
TimeType | type | |||
) |
Interface: External
This function is used to create and initialize an instance of CPKIFTime.
time | [in] A string containing time either in GeneralizedTime form or UTCTime time form |
type | [in] A TimeType which indicates if the time is in GeneralizedTime form or UTCTime time form. 2 stands for GeneralizedTime and 1 stands for UTCTime time form |
Definition at line 183 of file Time.cpp.
References fromGenTime(), fromUtcTime(), and UTCTIME.
CPKIFTime::CPKIFTime | ( | const char * | time | ) |
Interface: External
This function is used to create and initialize an instance of CPKIFTime. The string passed to the constructor specifies a time value in GeneralizedTime form. If null is passed into CPKIFTime(const char* time) constructor the time is set to the current time.
Example: CPKIFTime t("20050209081530Z");
Definition at line 214 of file Time.cpp.
References CurrentTime(), and fromGenTime().
CPKIFTime::~CPKIFTime | ( | ) |
CPKIFTimePtr CPKIFTime::CurrentTime | ( | ) | [static] |
Interface: External
This static function returns a smart pointer to a CPKIFTime object containing the current date and time
Definition at line 55 of file Time.cpp.
References m_impl.
Referenced by _tmain(), PKIFHTTP::AddBlacklistedHttpServer(), PKIFLDAP::AddBlacklistedServer(), IPKIFPkiArtifact::AddSource(), CPKIFTime(), CPKIFPathBasicChecks2::DoChecks(), PKIFHTTP::GetHttpServerBlacklist(), PKIFLDAP::GetServerBlacklist(), CPKIFPathSettings::GetValidationTime(), PKIFLDAP::IsBlacklisted(), PKIFHTTP::IsHttpServerBlacklisted(), CPKIFPathLogger::LogValidationResults(), MakeQueryForPath(), CPKIFCertStatusCache::PutObject(), CPKIFTimestampVerifier::Verify(), and CPKIFEvidenceRecordVerifier::Verify().
int CPKIFTime::year | ( | ) | const |
Interface: External
This function returns an integer containing the years value from the time value held by an instance of CPKIFTime.
Definition at line 259 of file Time.cpp.
Referenced by fromGenTime(), and fromUtcTime().
int CPKIFTime::month | ( | ) | const |
Interface: External
This function returns the month of the year, e.g. where 1=January and December=12.
Definition at line 275 of file Time.cpp.
Referenced by fromGenTime(), and fromUtcTime().
int CPKIFTime::dayOfMonth | ( | ) | const |
int CPKIFTime::hours | ( | ) | const |
int CPKIFTime::minutes | ( | ) | const |
Interface: External
This function returns an integer containing the number of minutes into the hour in the time value, e.g. a value in the range 0-59, inclusive.
int CPKIFTime::seconds | ( | ) | const |
const char * CPKIFTime::GetTime | ( | ) | const |
Interface: External
This function returns a pointer to a NULL-terminated string representation of the time value held by the instance of CPKIFTime. The value is valid for the life of the CPKIFTime object or until one of the Setxxx functions is invoked on the same object.
Definition at line 462 of file Time.cpp.
References m_timeStr.
void CPKIFTime::set | ( | int | year_, | |
int | month_, | |||
int | dom_, | |||
int | hours_, | |||
int | minutes_, | |||
int | seconds_ | |||
) |
Interface: External
This function is used to set the time value held by an instance of CPKIFTime,
CPKIFException(ASN1_INVALID_TIME) |
year_ | [in] Integer containing the year value to set |
month_ | [in] Integer containing the month value to set (1-12) |
dom_ | [in] Integer containing the day of month value to set (1-31) |
hours_ | [in] Integer containing the hours into the day value to set (0-23) |
minutes_ | [in] Integer containing the minutes into the hour value to set (0-59) |
seconds_ | [in] Integer containing the seconds into the minute value to set (0-59) |
Definition at line 497 of file Time.cpp.
References ASN1_INVALID_TIME, and TOOLKIT_ASN.
Referenced by fromGenTime(), and fromUtcTime().
Interface: External
This function assigns the value from the CPKIFTime object passed via the time_ parameter to the time value held by the instance on which this function was invoked.
time_ | [in] Reference to a CPKIFTime object containing the value to assign |
Definition at line 637 of file Time.cpp.
References m_impl.
CPKIFTime & CPKIFTime::operator+= | ( | const CPKIFDuration & | duration_ | ) |
Interface: External
This function adds a duration to the time value held by an instance of CPKIFTime.
duration_ | [in] Reference to a CPKIFDuration object containing the duration to add |
Definition at line 663 of file Time.cpp.
References CPKIFDuration::asSeconds(), COMMON_INVALID_INPUT, and TOOLKIT_ASN.
CPKIFTime & CPKIFTime::operator-= | ( | const CPKIFDuration & | duration_ | ) |
Interface: External
This function subtracts duration from the time value held by an instance of CPKIFTime.
duration_ | [in] Reference to a CPKIFDuration object containing the duration to subtract |
Definition at line 696 of file Time.cpp.
References CPKIFDuration::asSeconds(), COMMON_INVALID_INPUT, and TOOLKIT_ASN.
CPKIFTime CPKIFTime::operator+ | ( | const CPKIFDuration & | duration_ | ) | const |
Interface: External
This function adds a specified value to the time value held by an instance of CPKIFTime and returns a new instance containing the result.
duration_ | [in] Reference to a CPKIFDuration object containing the value to add to the time value |
Definition at line 730 of file Time.cpp.
References CPKIFDuration::asSeconds(), COMMON_INVALID_INPUT, m_impl, and TOOLKIT_ASN.
CPKIFTime CPKIFTime::operator- | ( | const CPKIFDuration & | duration_ | ) | const |
Interface: External
This function is used to subtract a specified value from the time value held by an instance of CPKIFTime
duration_ | [in] Reference to a CPKIFDuration object containing the value to subtract from the time value |
Definition at line 760 of file Time.cpp.
References CPKIFDuration::asSeconds(), COMMON_INVALID_INPUT, m_impl, and TOOLKIT_ASN.
CPKIFDuration CPKIFTime::operator- | ( | const CPKIFTime & | time_ | ) | const |
Interface: External
This function is used to subtract a specified value from the time value held by an instance of CPKIFTime
time_ | [in] Reference to a CPKIFTime object containing the value to subtract from the time value |
Definition at line 790 of file Time.cpp.
References m_impl, and CPKIFDuration::setSeconds().
bool CPKIFTime::operator== | ( | const CPKIFTime & | time_ | ) | const |
Interface: External
This function returns true if the value contained in the CPKIFTime object passed via the time_ parameter is equal to the value stored in the instance on which this function was invoked and false otherwise.
True | if the value contained in the CPKIFTime object passed via the time_ parameter is equal to the value stored in the instance on which this function was invoked | |
Flase | if the value contained in the CPKIFTime object passed via the time_ parameter is not equal to the value stored in the instance on which this function was invoked |
time_ | [in] Reference to a CPKIFTime object containing the time value to compare |
Definition at line 812 of file Time.cpp.
References m_impl.
bool CPKIFTime::operator!= | ( | const CPKIFTime & | time_ | ) | const |
Interface: External
This function returns true if the value contained in the CPKIFTime object passed via the time_ parameter is not equal to the value stored in the instance on which this function was invoked and false otherwise.
True | if the value contained in the CPKIFTime object passed via the time_ parameter is not equal to the value stored in the instance on which this function was invoked | |
Flase | if the value contained in the CPKIFTime object passed via the time_ parameter is equal to the value stored in the instance on which this function was invoked |
time_ | [in] Reference to a CPKIFTime object containing the time value to compare |
Definition at line 831 of file Time.cpp.
References m_impl.
bool CPKIFTime::operator< | ( | const CPKIFTime & | time_ | ) | const |
Interface: External
This function returns true if the value contained in the CPKIFTime object passed via the time_ parameter is greater then the value stored in the instance on which this function was invoked and false otherwise.
true | if the value contained in the CPKIFTime object passed via the time_ parameter is greater then the value stored in the instance on which this function was invoked | |
flase | if the value contained in the CPKIFTime object passed via the time_ parameter is not greater then the value stored in the instance on which this function was invoked |
Definition at line 850 of file Time.cpp.
References m_impl.
bool CPKIFTime::operator<= | ( | const CPKIFTime & | time_ | ) | const |
Interface: External
This function returns true if the value contained in the CPKIFTime object passed via the time_ parameter is less then or equal to the value stored in the instance on which this function was invoked and false otherwise.
false if the value contained in the CPKIFTime object passed via the time_ parameter is not greater then or not equal to the value stored in the instance on which this function was invoked
time_ | [in] Reference to a CPKIFTime object containing the time value to compare |
Definition at line 907 of file Time.cpp.
References m_impl.
bool CPKIFTime::operator> | ( | const CPKIFTime & | time_ | ) | const |
Interface: External
This function returns true if the value contained in the CPKIFTime object passed via the time_ parameter is greater then the value stored in the instance on which this function was invoked and false otherwise.
true | if the value contained in the CPKIFTime object passed via the time_ parameter is less then the value stored in the instance on which this function was invoked | |
flase | if the value contained in the CPKIFTime object passed via the time_ parameter is not less then the value stored in the instance on which this function was invoked |
time_ | [in] Reference to a CPKIFTime object containing the time value to compare |
Definition at line 869 of file Time.cpp.
References m_impl.
bool CPKIFTime::operator>= | ( | const CPKIFTime & | time_ | ) | const |
Interface: External
This function returns true if the value contained in the CPKIFTime object passed via the time_ parameter is less then or equal to the value stored in the instance on which this function was invoked and false otherwise.
false if the value contained in the CPKIFTime object passed via the time_ parameter is not less then or not equal to the value stored in the instance on which this function was invoked
time_ | [in] Reference to a CPKIFTime object containing the time value to compare |
Definition at line 888 of file Time.cpp.
References m_impl.