Faulty data returned in DIR() function from Windows (AREV32)
At 21 DEC 2021 11:43:36PM Robert Heard wrote:
I recently performed a listing of DOS files in a directory (a list was created and saved in LISTS file).
I have 3 items in DICT.VOC: DOS_FILE_SIZE, DOS_FILE_DATE, DOS_FILE_TIME.
As far as I know, these used to work perfectly, i.e. showed the correct results.
But now, the only field that is accurate is the first field returned in the call to DIR(), being the file size (in bytes).
In my listing, I found 3 wrong "Modified Date", where Windows shows the date being +1 to that reported in R/List.
But when I look at the 3rd column of data from DIR() - the time, this is like a "random number" when compared to the time stamp in Windows.
Can someone have a look at this, and let me know if they are experiencing the same issues? I suspect that with Windows updates, Microsoft have changed the data and/or locations of these last 2 columns, and AREV32 is not aware. Maybe an update required here?
Regards,
Robert.
At 22 DEC 2021 05:26AM Andrew McAuley wrote:
Just tested on OI 10 and in AREV64. Results reported reflect windows. I don't think DIR has been touched for quite some time - what version are you on?
World leaders in all things RevSoft
At 22 DEC 2021 10:36AM Jared Bratu wrote:
Robert,
I seem to recall there were some issues with the computer's locale or timezone when dealing with file modified date times between Windows Explorer and OI. Unfortunately, I can't find my notes on the issue but as I recall Windows stores the timezone as UTC but then translates it to local time and there was some difference with OI in certain circumstances.
At 23 DEC 2021 10:42AM D Harmacek wrote:
In 2009 I found this to be a problem on DOS files.
The files on the windows server were reporting back in UTC. Whereas local (desktop) files were in local time.
I wrote a function DIRLOCAL that had an adjustment for hours before UTC, including Daylight Time adjustments.
Dave Harmacek - Harmacek Database Systems - near Boston, MA USA