        SUBROUTINE DATIMX ( NOW)
C
C       Purpose: Fetch system local time and return various time elements
C       Calling: JD(), idate(), itime()
C
	INTEGER   NOW(14), nowtim(3), NDAY, JD
C
        CALL itime (nowtim)
        now(3) = nowtim(3)
        now(4) = nowtim(2)
        now(5) = nowtim(1)
        call idate (now(7),now(6),now(8))
        if (now(8).ge.78 .and. now(8).le.99) then
           now(8) = now(8) + 1900
         else
           now(8) = now(8) + 2000
        endif
        NDAY = JD (NOW(8),NOW(7),NOW(6)) - JD (1991,1,1)
        NOW(12) = MOD ((MOD (NDAY,7) + 2), 7) + 1
        NOW(13) = JD (NOW(8),NOW(7),NOW(6)) - JD (NOW(8),1,1) + 1
 	RETURN
 	END	
