PMDF Programmer's Reference Manual
PMDF-PRM-6.0


Previous | Contents

PMDF_get_date_time

Obtain the current date and time in an RFC 822/1123 compliant format.

VMS FORMAT

status = PMDF_get_date_time

(datetime, datetime_len)

argument information
Argument Data type Access Mechanism
datetime descriptor read/write reference
datetime_len unsigned word write reference

C FORMAT

status = PMDFgetDateTime (datetime, datetime_len)

argument information
int PMDFgetDateTime (datetime, datetime_len) 
         char *datetime; 
         int  *datetime_len; 

ARGUMENTS

datetime

String to receive the formatted date and time. Must be at least 26+N bytes long where N is the length of the local time zone string. (27+N for PMDFgetDateTime).

datetime_len

Length in bytes of the returned time string. Callers using PMDFgetDateTime must, on input, supply the maximum length in bytes of datetime.

DESCRIPTION

The routine PMDF_get_date_time may be used to obtain the system's current date and time. The returned string will be in a format compatible with RFC 822 and RFC 1123; e.g., "Wed, 16 Sep 1992 17:52:03 PDT". This string is then suitable for use in a Date: header line.
Return Values
PMDF__OK Normal, successful completion.
PMDF__FATERRLIB Call to LIB$SCOPY_R_DX failed owing to a fatal internal error in the OpenVMS Run Time Library. Date and time not returned.
PMDF__INSVIRMEM Insufficient virtual memory: call to LIB$GET_VM made by LIB$SCOPY_R_DX has failed. Date and time not returned.
PMDF__INVSTRDES Invalid string descriptor for datetime: descriptor has an invalid value in its DSC$B_CLASS field. Date and time not returned.
PMDF__STRTRU Supplied string was too long; value truncated to fit.


Previous | Next | Contents