      SUBROUTINE GTIME(DAT,TIM,DATM,TIMM)  
C**************************************************************************
C*
C*  PROGRAM TO GET TIME AND DATE AND CODE ACCORDING TO D5000 FORMAT
C*
C*  AUTOR: S.I. ZDZIESZYNSKI
C**************************************************************************
      CALL CDATE(DAT,DATM)
      CALL CTIME(TIM,TIMM)
      RETURN
      END
        SUBROUTINE CDATE(DAT,DATM)  
        INTEGER*2 IDAY,IMON,IYEAR
        CHARACTER*2 DAY,MON,YEAR
        CHARACTER*6 DATC
        CHARACTER*9 DAT
        REAL*4 DATM       
        CALL DATE(DAT)
        CALL IDATE(IMON,IDAY,IYEAR)
        ENCODE(2,1,DAY)IDAY
        ENCODE(2,1,MON)IMON
        ENCODE(2,1,YEAR)IYEAR
1       FORMAT(I2)
        ENCODE(6,3,DATC)DAY,MON,YEAR
3       FORMAT(3A2)
        DECODE(6,2,DATC)DATM
2       FORMAT(F8.0)
        RETURN
     	END
    	SUBROUTINE CTIME(TIM,TIMM)

     	CHARACTER TIM*8, ATIM*6
        REAL*4 TIMM         
        CALL TIME(TIM)
        ATIM(1:2) = TIM(1:2)
        ATIM(3:4) = TIM(4:5)
     	ATIM(5:6) = TIM(7:8)
     	DECODE( 6, 1, ATIM(1:6) )TIMM
1       FORMAT(F8.0)
     	RETURN
     	END
