Microsoft KB Archive/118434

= BUG: GETFILEINFOQQ with UNPACKTIMEQQ Fails in MS-DOS =

PSS ID Number: 118434

Article Last Modified on 11/3/1999

-

The information in this article applies to:


 * Microsoft FORTRAN PowerStation for MS-DOS 1.0a

-



This article was previously published under Q118434



SYMPTOMS
Using GETFILEINFOQQ to get the creation time of a file and UNPACKTIMEQQ to unpack the data into a usable form results in a time that is off by several hours. This problem occurs only in MS-DOS or version 3.1 of Windows.



STATUS
Microsoft has confirmed this to be a bug in Microsoft FORTRAN PowerStation for MS-DOS, version 1.0a.



MORE INFORMATION
To generate the the incorrect file time:


 * 1) Compile the sample code below, and name the code "TEST.FOR".
 * 2) Type dir test.for at the MS-DOS prompt in the directory containing the sample code. Record the present year, month, day, hour, and minute.
 * 3) Run the sample code from MS-DOS or from an MS-DOS command prompt in Windows (not Windows NT), and compare the date and time shown with the date and time from step 2.

Sample Code
c compile options needed: none

include 'flib.fi' include 'flib.fd' integer*2 iyr, imon,iday,ihr,imin,isec character*1 AMPM /'a'/ record /FILE$INFO/info ihandle = FILE$FIRST len=getfileinfoqq('TEST.FOR' ,info, ihandle) call unpacktimeqq(info.lastwrite, iyr,imon,iday,ihr,imin,isec) if (ihr .gt. 11) AMPM = 'p'     if (ihr .gt. 12) ihr = ihr-12 write (*,"(1x,2(I2.2,'-'),I2.2,I4,':',I2.2,a)") + imon,iday,iyr-1900,ihr,imin,AMPM END

Additional query words: 1.00a

Keywords: KB118434

Technology: kbAudDeveloper kbFORTRANPower100aDOS kbFortranSearch kbZNotKeyword3

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2004 Microsoft Corporation. All rights reserved.