Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ utc_mkascreltime(3dts) — DCE 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

utc_mkascreltime(3dts)  —  Subroutines

Name

utc_mkascreltime - Converts a NULL-terminated character string that represents a relative timestamp to a binary timestamp

Synopsis

#include <dce/utc.h> int utc_mkascreltime(
utc_t ∗utc,
char ∗string);

Parameters

Input

stringA NULL-terminated string that expresses a relative timestamp in its ISO format. 

Output

utcResulting binary timestamp. 

Description

The utc_mkascreltime() routine converts a NULL-terminated string, which represents a relative timestamp, to a binary timestamp. 

Notes

The ASCII string must be NULL-terminated. 

Return Values

 0Indicates that the routine executed successfully. 

-1Indicates an invalid time parameter or invalid results. 

Examples

The following example converts an ASCII relative time string to its binary equivalent. 

utc_t      utc;
char       str[UTC_MAX_STR_LEN];
 /∗   Relative time of -333 days, 12 hours, 1 minute, 37.223 seconds
 ∗   Inaccuracy of 50.22 seconds in the format:  -333-12:01:37.223I50.22
 ∗/
(void)strcpy((void ∗)str,
             "-333-12:01:37.223I50.22");
 utc_mkascreltime(&utc,   /∗ Out: Binary utc                     ∗/
                 str);   /∗ In:  String                         ∗/

Related Information

Functions: utc_ascreltime(3dts). 

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