<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unpacking file time data in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806568#M40482</link>
    <description>&lt;DIV&gt;Try the Win32 API routine FileTimeToSystemTime. The Platform SDK documentation on filetime has some other interesting stuff, such as:&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;P&gt;A &lt;B&gt;file time&lt;/B&gt; is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed since 12:00 A.M. January 1, 1601 (UTC). The system records file times whenever applications create, access, and write to files. Not all file systems can record creation and last access time and not all file systems record them in the same manner. For example, on NT FAT, create time has a resolution of 10 milliseconds, write time has a resolution of 2 seconds, and access time has a resolution of 1 day (really, the access date). On NTFS, access time has a resolution of 1 hour.&lt;/P&gt;
&lt;H4&gt;&lt;/H4&gt;
&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 27 Oct 2004 21:10:04 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2004-10-27T21:10:04Z</dc:date>
    <item>
      <title>Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806567#M40481</link>
      <description>&lt;DIV&gt;&lt;!--StartFragment --&gt;Does anyone know how to unpack the encoded file time data to greater precision than the integer seconds that GETFILEINFOQQ and UNPACKQQ gives? I "thought" the file times were actually encoded to miliseconds, but the unpack routine only gives to even seconds. I'm trying to get a more accurate time stamp for photos shot during an auto-sequence and could really use fractional seconds.&lt;BR /&gt;&lt;BR /&gt;Thanks - Greg &lt;/DIV&gt;</description>
      <pubDate>Wed, 27 Oct 2004 20:50:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806567#M40481</guid>
      <dc:creator>gregp</dc:creator>
      <dc:date>2004-10-27T20:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806568#M40482</link>
      <description>&lt;DIV&gt;Try the Win32 API routine FileTimeToSystemTime. The Platform SDK documentation on filetime has some other interesting stuff, such as:&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;P&gt;A &lt;B&gt;file time&lt;/B&gt; is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed since 12:00 A.M. January 1, 1601 (UTC). The system records file times whenever applications create, access, and write to files. Not all file systems can record creation and last access time and not all file systems record them in the same manner. For example, on NT FAT, create time has a resolution of 10 milliseconds, write time has a resolution of 2 seconds, and access time has a resolution of 1 day (really, the access date). On NTFS, access time has a resolution of 1 hour.&lt;/P&gt;
&lt;H4&gt;&lt;/H4&gt;
&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 27 Oct 2004 21:10:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806568#M40482</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2004-10-27T21:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806569#M40483</link>
      <description>&lt;DIV&gt;How do I link to the FileTimeToSystemTime routine? It comes up missing with the default libraries.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Thanks - Greg&lt;/DIV&gt;</description>
      <pubDate>Wed, 27 Oct 2004 22:14:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806569#M40483</guid>
      <dc:creator>gregp</dc:creator>
      <dc:date>2004-10-27T22:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806570#M40484</link>
      <description>&lt;DIV&gt;It's in Kernel32.dll, which must be linked in with every sane Windows application.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;However, if you USE DFWIN, that should fix it -- without it, the compiler can't see the correct prototype so it generates the wrong information for the linker.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Jugoslav&lt;/DIV&gt;</description>
      <pubDate>Wed, 27 Oct 2004 22:40:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806570#M40484</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2004-10-27T22:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806571#M40485</link>
      <description>&lt;DIV&gt;I have a console application not a windows application so it uses DFLIB. Can I still access it for a console app?&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;-Greg&lt;/DIV&gt;</description>
      <pubDate>Wed, 27 Oct 2004 22:52:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806571#M40485</guid>
      <dc:creator>gregp</dc:creator>
      <dc:date>2004-10-27T22:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806572#M40486</link>
      <description>&lt;DIV&gt;Yes, you have full access to the Win32 API from console applications.&lt;/DIV&gt;</description>
      <pubDate>Wed, 27 Oct 2004 23:56:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806572#M40486</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2004-10-27T23:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806573#M40487</link>
      <description>&lt;DIV&gt;I added a USE DFWIN and got it to find the routine, but get a memeory violation error. Guess I still don't have it quite right.&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Oct 2004 00:06:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806573#M40487</guid>
      <dc:creator>gregp</dc:creator>
      <dc:date>2004-10-28T00:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806574#M40488</link>
      <description>&lt;DIV&gt;So what does your code look like? This is a simple call, such as:&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;ret = FileTimeToSystemTime (ft,st)&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;where ft is a variable of type T_FILETIME and st is a variable of type T_SYSTEMTIME.&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Oct 2004 00:18:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806574#M40488</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2004-10-28T00:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806575#M40489</link>
      <description>&lt;DIV&gt;I can get the linker to work using USE KERNEL32 also.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Here's what I'm "trying"&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;use the function STAT to get the file date&lt;/DIV&gt;
&lt;DIV&gt;copy that intothe FILETIME structure low dw&lt;/DIV&gt;
&lt;DIV&gt;use the function FileTimeToSystemTime referencing the FILETIME structure and a SYSTEMTIME structure.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;I get an error instruction referenced memeory at "0x00000000"&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;-Greg&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Oct 2004 00:20:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806575#M40489</guid>
      <dc:creator>gregp</dc:creator>
      <dc:date>2004-10-28T00:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806576#M40490</link>
      <description>&lt;DIV&gt;T_FILETIME as a file type is new to me, will have to go look that up. I defined structures and used them in the function call.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;-Greg&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Oct 2004 00:32:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806576#M40490</guid>
      <dc:creator>gregp</dc:creator>
      <dc:date>2004-10-28T00:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806577#M40491</link>
      <description>&lt;DIV&gt;Seeing that I'm clearly missing it, here is what I had coded:&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;
&lt;P&gt;USE DFLIB&lt;/P&gt;
&lt;P&gt;USE KERNEL32&lt;/P&gt;
&lt;P&gt;USE SCREENIO&lt;/P&gt;
&lt;P&gt;USE DFPORT&lt;/P&gt;
&lt;P&gt;Structure /Systime1/ &lt;/P&gt;
&lt;P&gt;Integer*2 wYear; &lt;/P&gt;
&lt;P&gt;Integer*2 wMonth; &lt;/P&gt;
&lt;P&gt;Integer*2 wDayOfWeek; &lt;/P&gt;
&lt;P&gt;Integer*2 wDay; &lt;/P&gt;
&lt;P&gt;Integer*2 wHour; &lt;/P&gt;
&lt;P&gt;Integer*2 wMinute; &lt;/P&gt;
&lt;P&gt;Integer*2 wSecond; &lt;/P&gt;
&lt;P&gt;Integer*2 wMilliseconds &lt;/P&gt;
&lt;P&gt;End Structure&lt;/P&gt;
&lt;P&gt;Structure /Filetime1/&lt;/P&gt;
&lt;P&gt;Integer*4 wFile1&lt;/P&gt;
&lt;P&gt;Integer*4 wFile2&lt;/P&gt;
&lt;P&gt;End Structure&lt;/P&gt;
&lt;P&gt;c&lt;/P&gt;
&lt;P&gt;ifind = stat(file1,statb)&lt;/P&gt;
&lt;P&gt;isize1 = statb(8)&lt;/P&gt;
&lt;P&gt;date1 = statb(10)&lt;/P&gt;
&lt;P&gt;wFile1 = statb(10)&lt;/P&gt;
&lt;P&gt;wFile2 = 0&lt;/P&gt;
&lt;P&gt;status=FileTimeToSystemTime(wFile1,wYear)&lt;/P&gt;
&lt;P&gt;write(*,*) wDay,wHour,wMinute,wSecond,wMilliseconds&lt;/P&gt;&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Oct 2004 00:55:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806577#M40491</guid>
      <dc:creator>gregp</dc:creator>
      <dc:date>2004-10-28T00:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806578#M40492</link>
      <description>&lt;DIV&gt;I tried to set TYPE(T_FILETIME) FT and TYPE(T_SYSTEMTIME) ST then use them in the call but it says the arguments type mismatch. In Kernel32.F90 the arguments are defined as INTEGER.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;I also tried defining variables INTEGER FT and INTEGER ST then making the call, but then I get the memory error again.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;I'm lost.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;-Greg&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Oct 2004 01:34:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806578#M40492</guid>
      <dc:creator>gregp</dc:creator>
      <dc:date>2004-10-28T01:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806579#M40493</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;There are several things wrong here. First, the portability library routine stat returns a completely different kind of time than GETFILEINFOQQ. Second, upon further reading, GETFILEINFOQQ doesn't provide the granularity you want. You will have to use Win32 API routines, including GetFileTime,to get the information.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;When you are using structures, you also need to declare RECORD variables of the structure type. You haven't, and your references to wFile1 and wFile2 are just undeclared REAL variables, not fields of the structure.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Also, you appear to be using an old version of Compaq Visual Fortran or perhaps even Digital Visual Fortran. That is why the arguments to the routine in kernel32.f90 were integers - in that version, you have to pass loc(var) rather than var directly.&lt;/DIV&gt;&lt;P&gt;Message Edited by sblionel on &lt;SPAN class="date_text"&gt;10-27-2004&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;03:22 PM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2004 02:15:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806579#M40493</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2004-10-28T02:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806580#M40494</link>
      <description>&lt;DIV&gt;Before I bail completly on this experiment (because all the variations of using type,record,structure that I've tried from my too limited understanding of the documentation aren't working) ... is it possible my copy of Kernel32.F90 has a problem as the file time declerations in FileTimeToSystemTime and SystemTimeToFileTIme disagree? One types the argumensts as T_FILETIME etc and the other types both arguments as INTEGER??&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;-Greg&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Oct 2004 02:25:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806580#M40494</guid>
      <dc:creator>gregp</dc:creator>
      <dc:date>2004-10-28T02:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806581#M40495</link>
      <description>&lt;DIV&gt;What version of Visual Fortran are you using? The definition looked correct to me in CVF 6.6 and Intel Visual Fortran 8.1.&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Oct 2004 02:51:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806581#M40495</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2004-10-28T02:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806582#M40496</link>
      <description>&lt;DIV&gt;Compac Version 6.1&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;-Greg&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Oct 2004 04:25:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806582#M40496</guid>
      <dc:creator>gregp</dc:creator>
      <dc:date>2004-10-28T04:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Unpacking file time data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806583#M40497</link>
      <description>Ah, the distant past....&lt;BR /&gt;&lt;BR /&gt;Basically, you need the following Win32 API routines&lt;BR /&gt;&lt;BR /&gt;CreateFile (to open the file)&lt;BR /&gt;GetFileTime&lt;BR /&gt;CloseHandle&lt;BR /&gt;&lt;BR /&gt;Then you decide what to do with the FileTime value you get.</description>
      <pubDate>Thu, 28 Oct 2004 05:27:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unpacking-file-time-data/m-p/806583#M40497</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2004-10-28T05:27:57Z</dc:date>
    </item>
  </channel>
</rss>

