*Conan The Librarian
Converts OpenVMS binary system times to UNIX binary times.
unsigned int decc$fix_time (void *vms_time);
The address of a quadword containing an OpenVMS binary time:
unsigned int quadword;
unsigned int *vms_time = quadword;
This routine converts an OpenVMS binary system time (a 64-bit
quadword containing the number of 100-nanosecond ticks since
00:00 November 17, 1858) to a UNIX binary time (a longword
containing the number of seconds since 00:00 January 1, 1970).
This routine is useful for converting binary times returned by
OpenVMS system services and RMS services to the format used by
some Compaq C RTL routines, such as ctime and localtime.
x A longword containing the number of seconds
since 00:00 January 1, 1970.
(unsigned int)(-1) Indicates an error. Be aware, that a return
value of (unsigned int)(-1) can also represent
a valid date of Sun Feb 7 06:28:15 2106.
#include <starlet.h> /* VMS Specific SYS$ routines) */
unsigned int current_vms_
time; /* quadword for OpenVMS time */
unsigned int number_of_
seconds; /* number of seconds */
/* first get the current system time */
/* fix the time */
number_of_seconds = decc$fix_time(¤t_vms_time);
printf("Number of seconds since 00:00 January 1, 1970 = %d",
This example shows how to use the decc$fix_time routine in
Compaq C. It also shows the use of the SYS$GETTIM system