High Performance OPC UA Server SDK  1.1.0.158
utctime

Broken-down time format for UTC time. More...

Data Structures

struct  util_utctime
 Structure for utctime, see also utctime. More...
 

Functions

time_t util_utctime_to_time_t (const struct util_utctime *utc)
 Computes the unix time (time_t) from the given broken-down UTC time. More...
 
struct util_utctimeutil_utctime_from_time_t (struct util_utctime *dst, const time_t *src)
 Computes the broken-down UTC time from the given unix time (time_t). More...
 

Detailed Description

Broken-down time format for UTC time.

This type is defined anlogous to the standard ANSI C struct tm. There is no daylight saving information because this structure is only for UTC time.

Function Documentation

struct util_utctime* util_utctime_from_time_t ( struct util_utctime dst,
const time_t *  src 
)

Computes the broken-down UTC time from the given unix time (time_t).

This function is equivalent to ANSI C gmtime.

Parameters
timepPointer to time_t value, which represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
resultPointer to utctime structure which will receive the results.
Returns
This function returns result or NULL if operation fails.
time_t util_utctime_to_time_t ( const struct util_utctime utc)

Computes the unix time (time_t) from the given broken-down UTC time.

The returned time_t value represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

Parameters
utcThe broken-down UTC time. This operation does some input validation. If some time values are out of range the operation fails. The caller is responsible to set correct values. See definition of struct utctime for valid ranges.
Returns
The unix time_t or 0 if the operation fails.