VMS Help
CRTL, decc$fix_time, Example

 *Conan The Librarian

        #include <unixlib.h>
        #include <stdio.h>
        #include <starlet.h>  /* VMS Specific SYS$ routines)  */

        main()
        {
           unsigned int current_vms_
 time[2]; /* quadword for OpenVMS time */
           unsigned int number_of_
 seconds;   /* number of seconds     */

           /* first get the current system time */
           sys$gettim(&current_vms_time[0]);

           /* fix the time */
           number_of_seconds = decc$fix_time(&current_vms_time[0]);

           printf("Number of seconds since 00:00 January 1, 1970 = %d",
                   number_of_seconds);
        }

      This example shows how to use the decc$fix_time routine in
      Compaq C. It also shows the use of the SYS$GETTIM system
      service.
  Close     Help