Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ utc_ascgmtime(3dts) — DCE 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

utc_ascgmtime(3dts)  —  Subroutines

Name

utc_ascgmtime - Converts a binary timestamp to an ASCII string that expresses a GMT time

Synopsis

#include <dce/utc.h> int utc_ascgmtime(
char ∗cp,
size_t stringlen,
utc_t ∗utc);

Parameters

Input

stringlenLength of the cp buffer. 

utcBinary timestamp. 

Output

cpASCII string that represents the time. 

Description

The utc_ascgmtime() routine converts a binary timestamp to an ASCII string that expresses a time in GMT. 

Return Values

 0Indicates that the routine executed successfully. 

-1Indicates an invalid time parameter or invalid results. 

Examples

The following example converts the current time to GMT format. 

char   gmTime[UTC_MAX_STR_LEN];
 /∗   Convert the current time to ASCII in the following format:
 ∗          1991-04-01-12:27:38.37I2.00
 ∗/
utc_ascgmtime(gmTime,            /∗ Out: Converted time      ∗/
              UTC_MAX_STR_LEN,   /∗ In:  Length of string    ∗/
              (utc_t∗) NULL);    /∗ In:  Time to convert     ∗/
                                 /∗ Default is current time  ∗/

Related Information

Functions: utc_ascanytime(3dts), utc_asclocaltime(3dts). 

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