RSA Security logo

RSA BSAFE Cert-C
API Reference

GENERALIZED_TIME Reference

Stores a time value.

The time value is represented in the Generalized Time format, defined in the X.680 standard, ASN.1. The GENERALIZED_TIME structure is used in the INVALID_DATE, OCSP_EVIDENCE, PKI_MSG_FIELDS, and PRIVATE_KEY_USAGE_PERIOD structures, and with the C_DEREncodeGeneralizedTime() and C_BERDecodeGeneralizedTime() functions.

For example, the following statements input the UTC time of 6 minutes, 27.000003 seconds after 9:00 P.M. on November 6, 1985 (the X.680 UTC time is 19851106210627.000003Z).

    GENERALIZED_TIME generalizedTime;

    generalizedTime.year = 1985;
    generalizedTime.month = 11;
    generalizedTime.day = 6;
    generalizedTime.hour = 21;
    generalizedTime.minute = 6;
    generalizedTime.second = 27;
    generalizedTime.microSecond = 3;
    generalizedTime.timeZone = 0;
 

#include <basetype.h>

00109 typedef struct GENERALIZED_TIME {
00114   unsigned short year;                                     /* 4 digit number */
00120   unsigned short month;                            /* 2 digits from 01 to 12 */
00126   unsigned short day;                              /* 2 digits from 01 to 31 */
00132   unsigned short hour;                              /* 2 digits from 0 to 23 */
00138   unsigned short minute;                            /* 2 digits from 0 to 59 */
00144   unsigned short second;                            /* 2 digits from 0 to 59 */
00150   UINT4 microSecond;                                        /* micro seconds */
00159   short int timeZone;                         /* different in minutes, moving
00160                                         westward, between UTC and local time */
00161 } GENERALIZED_TIME;

Data Fields

unsigned short year
 A 4-digit number representing the year.

unsigned short month
 A 2-digit number representing the month of the year. More...

unsigned short day
 A 2-digit number representing the day of the month. More...

unsigned short hour
 A 2-digit number representing the hour of the day. More...

unsigned short minute
 A 2-digit number representing the minute of the hour. More...

unsigned short second
 A 2-digit number representing the second of the minute. More...

UINT4 microSecond
 A UINT4 value that represents a fraction of a second in microsecond units.

short int timeZone
 A short int value that represents the difference in minutes, moving westward, between the UTC, defined in X.208, and local time. More...


Field Documentation (alphabetical)

unsigned short day
 

A 2-digit number representing the day of the month. Value is from 01 to 31.

unsigned short hour
 

A 2-digit number representing the hour of the day. Value is from 00 to 23.

unsigned short minute
 

A 2-digit number representing the minute of the hour. Value is from 00 to 59.

unsigned short month
 

A 2-digit number representing the month of the year. Value is from 01 to 12.

unsigned short second
 

A 2-digit number representing the second of the minute. Value is from 00 to 59.

short int timeZone
 

A short int value that represents the difference in minutes, moving westward, between the UTC, defined in X.208, and local time. If this field is 0, then the time is the UTC time. Otherwise, the time is a local time.


The documentation for this struct was generated from the following file:


RSA BSAFE® Cert-C 2.7 API Reference