News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Check your file managers...!

Started by jj2007, November 04, 2015, 05:27:22 AM

Previous topic - Next topic

jj2007

Attached a version of \Masm32\include\ObjMem32.inc with a modified .inx extension to avoid any overwriting problems.

According to
- my default file manager, FreeCommander
- my previous one, 2x
- and 7-Zip, PeaZip, FreeArc

this file was last modified 24 May 2012, 01:00

Windows Explorer and Firefox say 24 May 2012, 02:00 8)

What do your goodies say?

nidud

#1
deleted

jj2007

Quote from: nidud on November 04, 2015, 05:53:39 AM

File Panel:

24.05.2012   01:00:00


What is File Panel? Part of WinSCP?

Btw if I extract the file with 7-Zip to another folder, the result is identical: 01:00 in file managers, 02:00 in Explorer, and also in the file properties dialog, even if started per right-click from the "faulty" file manager. I have an explanation why this is so but would like to collect some evidence first.

ragdog

Hello

Windows Explorer and Winrar say 24 May 2012, 02:00

dedndave

i believe the file system stores the date and time in UTC
the information you see is then converted to the current local time settings

nidud

#5
deleted

jj2007

Quote from: dedndave on November 04, 2015, 06:16:55 AM
i believe the file system stores the date and time in UTC
the information you see is then converted to the current local time settings

Yes indeed. The question is whether the Windows Explorer time is the same as the one reported by other tools. What does right-clicking in Explorer, File properties tell you?

Btw the creation date in attribute changer is far away from the real one, which is 03 ‎November ‎2015, ‏‎19:57:00

@ragdog: thanks, so explorer and winrar use the same method.

With regard to the screenshot below, Sherlock Holmes is convinced that the official Windows Explorer uses a function that has ­Tz in its name - Herge should know it  8)

nidud

#7
deleted

K_F

No problems here... could be that I disabled auto internet time sync service... or what ever it's called.
;)
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

jj2007

Quote from: nidud on November 04, 2015, 07:15:20 AM
QuoteBtw the creation date in attribute changer is far away from the real one, which is 03 November 2015, 19:57:00

That's today.

Only modification time [24.05.12-01:00:00] is stored in the ZIP file. The time above is from decompression(?). Modification time then becomes [24.05.12-01:00:00] + local time (plus four hours apparently).

Oops :P

Yes of course :t

What about File Panel vs right-click in Explorer -> properties, both +1:00?

P.S.: After finding out that the mysterious bug affects even the command line DIR, a bit of googling revealed that Raymond Chen is aware of the problem: Why do Explorer and the command prompt interpret file times differently?

QuoteExplorer uses ... the time zone that was in effect at your current location at the time the timestamp was created
...
Why doesn't the command processor get with the program?

Well, for one thing, the people who decide what Explorer does are not the same people who decide what the command processor does. (The Explorer folks can certainly make suggestions, but they can't force the command processor to do anything.) It's like asking why Taco Bell puts the men's room on the left, but Pizza Hut puts it on the right.

The command processor is an old and cranky program. The command processor yells at Explorer to get off his lawn.

jj2007

Update: MasmBasic version 6 November uses now, like Windows Explorer, the local time that was in place when the file was modified.

Example (comparing MasmBasic and DOS timestamps):

include \masm32\MasmBasic\MasmBasic.inc      ; download
  Init
  GetFiles \Masm32\examples\exampl01\comctls\*      ; create the Files$() array
  SortFiles              ; default: sort the Files$() array by date, most recent files first
  For_ ebx=0 To eax-1    ; print the results
      PrintLine Str$(GfSize(ebx)), Tb$, GfDate$(ebx), Spc2$, GfTime$(ebx), Tb$, Files$(ebx)
  Next
  Inkey Launch$("cmd /c dir /a-d /s /o-d \Masm32\examples\exampl01\comctls\*")
EndOfCode

Output:
5632    24.02.2015  17:36:34    \Masm32\examples\exampl01\comctls\comctls.exe
1020    24.02.2015  17:36:33    \Masm32\examples\exampl01\comctls\rsrc.res
12762   29.09.2011  03:08:15    \Masm32\examples\exampl01\comctls\comctls.asm
288     07.09.1998  14:17:58    \Masm32\examples\exampl01\comctls\rsrc.rc
766     07.09.1998  07:51:38    \Masm32\examples\exampl01\comctls\mainicon.ico

Directory ... \Masm32\examples\exampl01\comctls

24.02.15  17:36             5,632 comctls.exe
24.02.15  17:36             1,020 rsrc.res
29.09.11  02:08            12,762 comctls.asm
07.09.98  13:17               288 rsrc.rc
07.09.98  06:51               766 mainicon.ico


The wrong DOS times (in red) are all during summer daylight saving time.

More reading at The Old New Thing:
Why do Explorer and the command prompt interpret file times differently?
Converting from a UTC-based SYSTEMTIME directly to a local-time-based SYSTEMTIME

The second link explains the function that has Tz in its name :P

P.S.: Source & exe attached.