ASN1TGeneralizedTime Class Reference
[Date and Time Runtime Classes]
#include <ASN1TTime.h>
Inheritance diagram for ASN1TGeneralizedTime:

Detailed Description
ASN.1 GeneralizedTime utility class. The ASN1TGeneralizedTime class is derived from the ASN1TTime base class.
Public Member Functions | |
| ASN1TGeneralizedTime () | |
| ASN1TGeneralizedTime (const char *buf, OSBOOL useDerRules=FALSE) | |
| ASN1TGeneralizedTime (OSBOOL useDerRules) | |
| ASN1TGeneralizedTime (const ASN1TGeneralizedTime &original) | |
| int | getCentury () const |
| int | setCentury (int century) |
| int | setTime (time_t time, OSBOOL diffTime) |
| int | parseString (const char *string) |
| const ASN1TGeneralizedTime & | operator= (const ASN1TGeneralizedTime &tm) |
| int | compileString (char *pbuf, size_t bufsize) const |
Constructor & Destructor Documentation
| ASN1TGeneralizedTime::ASN1TGeneralizedTime | ( | ) | [inline] |
A default constructor.
| ASN1TGeneralizedTime::ASN1TGeneralizedTime | ( | const char * | buf, | |
| OSBOOL | useDerRules = FALSE | |||
| ) |
This constructor creates a time object using the specified time string.
- Parameters:
-
buf A pointer to the time string to be parsed. useDerRules An OSBOOL value.
| ASN1TGeneralizedTime::ASN1TGeneralizedTime | ( | OSBOOL | useDerRules | ) | [inline] |
This constructor creates an empty time object.
- Parameters:
-
useDerRules An OSBOOL value.
| ASN1TGeneralizedTime::ASN1TGeneralizedTime | ( | const ASN1TGeneralizedTime & | original | ) | [inline] |
A copy constructor.
Member Function Documentation
| int ASN1TGeneralizedTime::getCentury | ( | ) | const |
This method returns the centry part (first two digits) of the year component of the time value.
- Returns:
- Century part (first two digits) of the year component is returned if the operation is sucessful. If the operation fails, one of the negative status codes is returned.
| int ASN1TGeneralizedTime::setCentury | ( | int | century | ) |
This method sets the centry part (first two digits) of the year component of the time value.
- Parameters:
-
century Century part (first two digits) of the year component.
- Returns:
- Completion status of operation:
- 0 (0) = success,
- negative return value is error.
| int ASN1TGeneralizedTime::setTime | ( | time_t | time, | |
| OSBOOL | diffTime | |||
| ) | [virtual] |
This converts the value of the C built-in type time_t to a time string.
The value is the number of seconds from January 1, 1970.
- Parameters:
-
time The time value, expressed as a number of seconds from January 1, 1970. diffTime TRUE means the difference between local time and UTC time will be calculated; in other case, only local time will be stored.
- Returns:
- Completion status of operation:
- 0 (0) = success,
- negative return value is error.
Implements ASN1TTime.
| int ASN1TGeneralizedTime::parseString | ( | const char * | string | ) | [virtual] |
Parses sting.
- Returns:
- Completion status of operation:
- 0 (0) = success,
- negative return value is error.
Implements ASN1TTime.
| int ASN1TGeneralizedTime::compileString | ( | char * | pbuf, | |
| size_t | bufsize | |||
| ) | const [virtual] |
Compiles new time string accoring X.680 and ISO 8601. Returns 0, if succeed, or error code, if error.
- Parameters:
-
pbuf A pointer to destination buffer. bufsize A size of destination buffer.
- Returns:
- Completion status of operation:
- 0 (0) = success,
- negative return value is error.
Implements ASN1TTime.
The documentation for this class was generated from the following file:
