PMDF Programmer's Reference Manual


Previous Contents Index


PMDFgetDateTime

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

PASCAL

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

status = PMDFgetDateTime (datetime, datetime_len)

argument information


int PMDFgetDateTime(char *datetime, int *datetime_len) 


Arguments

datetime

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

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 PMDFgetDateTime can 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., "Sat, 04 May 2012 18:04:00 EDT". 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 Index