Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ utc_gmtime(3dts) — DCE 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

utc_gmtime(3dts)  —  Subroutines

Name

utc_gmtime - Converts a binary timestamp to a tm structure that expresses GMT or the equivalent UTC

Synopsis

#include <dce/utc.h> int utc_gmtime(
struct tm ∗timetm,
long ∗tns,
struct tm ∗inacctm,
long ∗ins,
utc_t ∗utc);

Parameters

Input

utcBinary timestamp to be converted to tm structure components.  Use NULL if you want this routine to use the current time for this parameter. 

Output

timetmTime component of the binary timestamp. 

tnsNanoseconds since the time component of the binary timestamp. 

inacctmSeconds of the inaccuracy component of the binary timestamp.  If the inaccuracy is finite, then tm_mday returns a value of −1 and tm_mon and tm_year return values of 0 (zero).  The field tm_yday contains the inaccuracy in days.  If the inaccuracy is unspecified, all tm structure fields return values of −1. 

insNanoseconds of the inaccuracy component of the binary timestamp.  If the inaccuracy is unspecified, ins returns a value of −1. 

Description

The utc_gmtime() routine converts a binary timestamp to a tm structure that expresses GMT (or the equivalent UTC).  Additional returns include nanoseconds since time and nanoseconds of inaccuracy. 

Return Values

 0Indicates that the routine executed successfully. 

-1Indicates an invalid time argument or invalid results. 

Examples

See the sample program in the utc_cmpintervaltime(3dts) reference page. 

Related Information

Functions: utc_anytime(3dts), utc_gmtzone(3dts), utc_localtime(3dts), utc_mkgmtime(3dts). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026