      subroutine ut(date,t)
C
C This routine returns the date and time in Greenwich England.
C It assumes that the time generated by the computer is Mountain
C Standard Time in the USA.
C
C Name I/O   Type      Structure Meaning
C
C date Out   Integer   (3)       date(1) is day
C                                date(2) is month (Jan=1,...,Dec=12
C                                date(3) is year
C t    Out   Integer   (3)       t(1) is hour
C                                t(2) is minute
C                                t(3) is second
C Errors:
C 
C No errors should be generated by this routine. No errors are trapped.
C
C Subroutines accessed
C
C idate 
C itime
C
C Note: The two routines listed above are specific to Sun's implementation
C of FORTRAN and the FORTRAN library. This routine will probably not work
C on most computers and probably will not compile properly on most
C FORTRAN compilers. If you are porting, test this routine and rewrite 
C it if necessary.
C
C BUGS:
C
C This routine is specific to Mountain Standard Time. 
C

      implicit none
      integer date,altdate,t,mo_length
      integer*2 ihr,imin,isec,i100th,iyr,imon,iday,
     $     iyr2,imon2,iday2
      dimension date(3),altdate(3),t(3),mo_length(12)
      data mo_length/31,28,31,30,31,30,31,31,30,31,30,31/
      call getdat(iyr,imon,iday)
      call gettim(ihr,imin,isec,i100th)
      call getdat(iyr2,imon2,iday2)
      date(1)=iday
      date(2)=imon
      date(3)=iyr
      t(1)=ihr
      t(2)=imin
      t(3)=isec
      altdate(1)=iyr2
      altdate(2)=imon2
      altdate(3)=iday2
C      call idate(date)
C      call itime(t)
C      call idate(altdate)
C
C This excursion verifies that the date and time are from the same day. 
C If the calls to idate and itime are split across midnight, there might 
C be a 24 hour error.  If they are split, another call to both will 
C solve the problem (unless our computer speed in measured in 
C instructions per day).
C
      if (date(1) .ne. altdate(1)) then
C         call idate(date)
C         call itime(t)
         call getdat(iyr,imon,iday)
         call gettim(ihr,imin,isec,i100th)
         date(1)=iday
         date(2)=imon
         date(3)=iyr
         t(1)=ihr
         t(2)=imin
         t(3)=isec
      end if
      if (mod(date(3),4) .eq. 0) then
         mo_length(2)=29
      end if
      if (mod(date(3),100) .eq. 0) then
         mo_length(2)=28
      end if
      if (mod(date(3),400) .eq. 0) then
         mo_length(2)=29
      end if
C
C Change the following line (the '7' specifically) to get out of
C mountain standard time.
C
      if ((t(1)+7)/24 .eq. 1) then
         date(1)=date(1)+1
      end if
      if (date(1) .gt. mo_length(date(2))) then
         date(2)=date(2)+1
         date(1)=1
      end if
      if (date(2) .gt. 12) then
         date(3)=date(3)+1
         date(2)=1
      end if
C
C Change this line to get out of mountain standard time.
C
      t(1)=mod(t(1)+7,24)
      return
      end
