tibrvMsgDateTime
Type
Declaration
typedef struct
{
tibrv_i64 sec;
tibrv_u32 nsec;
}tibrvMsgDateTime
;
Purpose
Accessor |
Description |
|
Signed 64-bit integer representing seconds. |
|
Unsigned 32-bit integer representing nanoseconds after the seconds value. This value is always non-negative, between zero and 999999999. It modifies the date in whole seconds by specifying the number of nanoseconds after that date. For example, the time 1/2 second before midnight of December 31, 1969 is -1 seconds plus 500,000,000 nanoseconds. |
Converting Dates to Strings
tibrvMsg_ConvertToString() prints times in UTC format (also known as Zulu time or GMT). The ISO-8601 standard requires appending a Z
character in this notation.
tibrvMsg_ConvertToString() uses Common Era numbering for years. This system does not include a year zero. So for example, the time 1 second before 0001-01-01 00:00:00Z
would print as -0001-12-31 23:59:59Z
.
tibrvMsg_ConvertToString() uses a proleptic Gregorian calendar. That is, when formatting dates earlier than the adoption of the Gregorian calendar, it projects the Gregorian calendar backward beyond its actual invention and adoption.
Representations
Rendezvous software represents time values in two ways—one within C programs, and a more compact wire format within messages. Date and Time Representations compares these two representations. In both representations, zero denotes the epoch, 12:00 midnight, January 1st, 1970. Range limits denote the extreme value on either side of that center. Bold type indicates the primary unit of measurement for each representation.
Representation |
Details |
|
Within C programs |
Seconds as a 64-bit signed integer, plus nanoseconds as a 32-bit unsigned integer. However, values are restricted to the range and granularity supported by Rendezvous wire format. Forcing larger or finer values into this representation produces an error. Two constants bracket the available (restricted) range of values within programs— |
|
range in years |
|
|
range in seconds |
|
|
restricted range in seconds |
|
|
restricted range in millisecs |
|
|
Rendezvous wire format |
Seconds as a 40-bit signed integer, plus microseconds as a 24-bit unsigned integer. |
|
range in years |
|
|
range in seconds |
|
|
range in milliseconds |
|