Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ bstr_time_convert(3) — BASEstar Open Server 3.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

bstr_time_convert(3)  —  Subroutines

Name

bstr_time_convert − Converts a BASEstar Open time value to a specified implementation-dependent format, and vice versa. 

Syntax

bstr_t_status bstr_time_convert(
                                bstr_t_time_conversion  conversion,
                                bstr_t_address          user_time,
                                bstr_t_time             ∗internal_time)

Description

The bstr_time_convert procedure converts a BASEstar Open time to a specified platform-dependent time format, and vice versa. 

Arguments

conversion
access: read
Specifies the type of the time conversion to be performed. The supported values are:

•
 BSTR_C_TM_INTERNAL_TO_LOCALTIME. To convert from BASEstar Open time to localtime format.

•
 BSTR_C_TM_INTERNAL_TO_TIME. To convert from BASEstar Open time to the C language "time" type format.

•
 BSTR_C_TM_INTERNAL_TO_TIMEVAL. To convert from BASEstar Open time to timeval format.

•
 BSTR_C_TM_LOCALTIME_TO_INTERNAL. To convert from localtime to BASEstar Open time format.

•
 BSTR_C_TM_TIME_TO_INTERNAL. To convert from the C Language "time" type format to BASEstar Open time format.

•
 BSTR_C_TM_TIMEVAL_TO_INTERNAL. To convert from timeval to BASEstar Open time format.

user_time
access: read or write
The address of a buffer which provides or returns  the user-specified time value. The allocated buffer must be consistent with the time conversion specified in the conversion argument, as follows:

Conversion Type C Language Type
BSTR_C_TM_INTERNAL_TO_LOCALTIME struct tm
BSTR_C_TM_INTERNAL_TO_TIME time_t type
BSTR_C_TM_INTERNAL_TO_TIMEVAL struct timeval
BSTR_C_TM_LOCALTIME_TO_INTERNAL tm structure
BSTR_C_TM_TIME_TO_INTERNAL time_t type
BSTR_C_TM_TIMEVAL_TO_INTERNAL struct timeval

You can find additional information on the structures listed above, as follows:

•tm structure

•DIGITAL UNIX:
Defined in the <time.h> include file. See also localtime(3).

•OpenVMS:
Defined in the <time.h> include file. Refer to the VAX C Run-Time Library Reference Manual documentation for details. 

•MS Windows:
Defined in the <time.h> include file. Refer to the Microsoft C Language documentation.

•time_t type

•DIGITAL UNIX:
Defined in the <time.h> include file. See also time(3).

•OpenVMS:
Defined in the <timeb.h> and <time.h> include files. Refer to the VAX C Run-Time Library Reference Manual documentation for details. 

•MS Windows:
Defined in the <time.h> include file. Refer to the Microsoft C Language documentation.

•Struct timeval

•DIGITAL UNIX:
Defined in the sys/time.h include file. See also gettimeofday(3).

•OpenVMS:
Defined in the <socket.h> include file. Refer to the TCI/IP Networking on OpenVMS Systems documentation for details. 

•MS Windows:
Defined in the <time.h> include file. For example, refer to the PathWork include files and documentation.

Access to the specified buffer depends on the value of the conversion argument, as follows:

Conversion Type user_time Argument
Access
BSTR_C_TM_INTERNAL_TO_LOCALTIME write
BSTR_C_TM_INTERNAL_TO_TIME write
BSTR_C_TM_INTERNAL_TO_TIMEVAL write
BSTR_C_TM_LOCALTIME_TO_INTERNAL read
BSTR_C_TM_TIME_TO_INTERNAL read
BSTR_C_TM_TIMEVAL_TO_INTERNAL read

internal_time
access: read or write
The address of a bstr_t_time variable which provides or returns the BASEstar Open time value, depending on the value of conversion, as follows:

Conversion Type internal_time Argument Access
BSTR_C_TM_INTERNAL_TO_LOCALTIME read
BSTR_C_TM_INTERNAL_TO_TIME read
BSTR_C_TM_INTERNAL_TO_TIMEVAL read
BSTR_C_TM_LOCALTIME_TO_INTERNAL write
BSTR_C_TM_TIME_TO_INTERNAL write
BSTR_C_TM_TIMEVAL_TO_INTERNAL write

Return Values

BSTR_S_BAD_PARAMETER Bad parameter value
BSTR_S_COM_PC_SIZE_MISMATCH Number of bytes requested does not match the number of bytes returned
BSTR_S_NORMAL Normal successful completion

See Also

bstr_get_time #
bstr_time_compare #
bstr_time_to_string #

 

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