C
C This program writes the current date and time to the standard output
C   device.
C Written by Robert E. Zaret, who relinquishes all rights.
C
      CHARACTER*20 DATE, TIME
      CALL DATIM (DATE, TIME)
      WRITE (*, *) DATE, TIME
      END
$NOTSTRICT
      SUBROUTINE DATIM (DATRUN, TIMRUN)
C
C This routine returns the date and time when it is called.
C
C This version is for Microsoft Fortran 5.0
C
C Written 15 Aug 1989 by Robert E. Zaret (SWEC, Boston)
C
      CHARACTER*(*) DATRUN, TIMRUN
      CHARACTER*3  MONTHS(12)
      INTEGER*2    IHR, IMIN, ISEC, I100TH, IYR, IMON, IDAY
      DATA MONTHS / 'JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN',
     +              'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'   /
      CALL GETDAT (IYR, IMON, IDAY)
      CALL GETTIM (IHR, IMIN, ISEC, I100TH)
      WRITE (DATRUN, 10) IDAY, MONTHS(IMON), IYR
      WRITE (TIMRUN, 20) IHR, IMIN, ISEC
      IF (TIMRUN(4 : 4) .EQ. ' ') TIMRUN(4 : 4) = '0'
      IF (TIMRUN(7 : 7) .EQ. ' ') TIMRUN(7 : 7) = '0'
      RETURN
   10 FORMAT (I3, 1X, A3, 1X, I4)
   20 FORMAT (I2, ':', I2, ':', I2)
      END
