Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ utc_mklocaltime(3dts) — DCE 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

utc_mklocaltime(3dts)  —  Subroutines

Name

utc_mklocaltime - Converts a tm structure that expresses local time to a binary timestamp

Synopsis

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

Parameters

Input

timetmA tm structure that expresses the local time.  On input, tm_wday and tm_yday are ignored; the value of tm_isdst should be -1. 

tnsNanoseconds since the time component. 

inacctmA tm structure that expresses days, hours, minutes, and seconds of inaccuracy.  If a null pointer is passed, or if tm_yday is negative, the inaccuracy is considered to be unspecified.  On input, tm_mday, tm_mon, tm_wday, and tm_isdst are ignored. 

insNanoseconds of the inaccuracy component. 

Output

utcResulting binary timestamp. 

Description

The utc_mklocaltime() routine converts a tm structure that expresses local time to a binary timestamp. 

The user’s environment determines the time zone rule (details are system dependent).  For example, on OSF/1 systems, the user selects a time zone by specifying the TZ environment variable. (The reference information for the localtime() system call, which is described in the ctime(3) reference page, provides additional information.) 

If the user’s environment does not specify a time zone rule, the system’s rule is used (details of the rule are system dependent).  For example, on OSF/1 systems, the rule in /etc/zoneinfo/localtime applies. 

Additional inputs include nanoseconds since the last second of 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_cmpmidtime(3dts) reference page. 

Related Information

Functions: utc_localtime(3dts). 

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