A bit of a complaint regarding @FileDate and @FileTime

May 24, 2010
855
0
Northlake, Il
As everybody well knows, there was a time change this weekend for most of the country to change from "Daylight Savings Time" to "standard time". Well, it turns out that that had an unexpected and (to me) somewhat unacceptable side-effect, and that is that the last-modification times (and possibly dates) of files that were last modified before the time change were also effectively "modified" after the time change, and this has a very unacceptable side-effect for me. Without going into great detail, I use the last-modification times (and dates) for "versioning" purposes, and having those times (and possibly dates) effectively changing without anything else about the file changing causes me significant problems because it throws my "versioning" system "all out of whack", as the saying goes. I'm not quite sure what the best way to "handle" this would be; having file create, last-modified, and last-accessed times recorded and/or displayed in "standard time" at all times could certainly cause confusion if the current time/date is within "Daylight Savings Time", but, again, having these times (and possibly dates) change without the file being changed in any way is also problem. The best "solution" I can suggest is to have an optional "standard time" parameter for the @FileTime and @FileDate functions that causes the function to examine the file's date and time to see if it is set to a time/date that is within the period where Daylight Savings Time was in effect, and therefore convert that time to "Standard Time" for reporting purposes. This would be very similar to the existing "u" (UTC) option (which I am almost certain must also aware of the current time zone and whether or not Daylight Savings Time is in effect); after all, Windows 7 at least (and I'd be very surprised if it wasn't true for Windows XP and probably earlier Windows versions, but since I haven't used any of them for a long time I can't be sure about that) is completely "aware" of the time zone you are in and whether or not Daylight Savings Time is in effect, and so is TCMD/TCC as a whole, so to speak, given that there is the "%_DST" "internal" variable. Just an idea, unless someone has a better idea...
 
May 20, 2008
3,515
4
Elkridge, MD, USA
From: mathewsdw
Subject: [Support-t-3348] A bit of a complaint regarding @FileDate and @FileTime
...

This issue has been thoroughly discussed and debated in the forum over the years. Short summary:

1/ This is an NTFS artifact. All timestamps returned by MS programs (actual operating system software not included), e.g., Windows Explorer, Internet Explorer, CMD.EXE, etc. are in the terms of many users "screwed up". Rex Conn chose MS / CMD compatibility over correctness as the TC default. Some like it, some of us do not. Cannot satisfy all the people all the time.

2/ @fileage, @filedate and @filetime all have the option to return file timestamps in UTC, which does not vary with DST. This value can be used by your versioning system, as there will never be actually different timestamps which appear to be the same in local time, as can happen if you create a file in the one hour of "falling back".

3/ The plugin iso8601.dll from Charles Dye of the University of New Mexico has a function @filestamp which returns file timestamps based on the state of local DST at the time of the filestamp, not on what it is when you examine it. This function also behaves in the manner you desire.

As said, the tools are already availabe for you!
--
HTH, Steve
 
May 24, 2010
855
0
Northlake, Il
From: mathewsdw
Subject: [Support-t-3348] A bit of a complaint regarding @FileDate and @FileTime
...

This issue has been thoroughly discussed and debated in the forum over the years.

...

2/ @fileage, @filedate and @filetime all have the option to return file timestamps in UTC, which does not vary with DST.

...

3/ The plugin iso8601.dll from Charles Dye of the University of New Mexico has a function @filestamp which returns file timestamps based on the state of local DST at the time of the filestamp, not on what it is when you examine it. This function also behaves in the manner you desire.

...
--
HTH, Steve
Steve, despite what you say about "This issue has been thoroughly discussed and debated in the forum over the years", when I do a search, I don't come up with anything relevant at this time. If I'm doing something wrong (a definite possibility given my previously-mentioned disabilities) I don't know what that is

As far as "return file timestamps in UTC" goes, that is not an acceptable option for me because I want to see dates and times relative to whatever date and time I modified the file, for instance, in my time zone (I'm easily confused!).

I wasn't aware that Charles Dye's iso8601 plugin had that capability, and that is, in fact, the perfect solution. Thank you!
 

samintz

Scott Mintz
May 20, 2008
1,511
18
Solon, OH, USA
Matthew,

Unfortunately, this issue has been around in Windows since the very first
NTFS file system in Windows NT 3.1. One possible solution is to disable
DST on your PC and manually set the time on your computer. The down side
to doing that is the network time servers available on the Interwebs that
would normally set the time automatically on your PC won't work properly.
Your time would always be off by an hour during DST. Nonetheless, if you
are willing to manually set your computer's time, you can disable DST and
you won't see the local times change on your filesystem.

Another, not recommended solution, is to use FAT32 instead of NTFS for the
file system.

-Scott





Steve, despite what you say about "This issue has been thoroughly
discussed and debated in the forum over the years", when I do a search, I
don't come up with anything relevant at this time. If I'm doing something
wrong (a definite possibility given my previously-mentioned disabilities)
I don't know what that is

As far as "return file timestamps in UTC" goes, that is not an acceptable
option for me because I want to see dates and times relative to whatever
date and time I modified the file, for instance, in my time zone (I'm
easily confused!).

I wasn't aware that Charles Dye's iso8601 plugin had that capability, and
that is, in fact, the perfect solution. Thank you!
 
Similar threads
Thread starter Title Forum Replies Date
Peter Murschall Single-line Do-CMD is a bit uncooperative. Support 6
Joe Caverly VBEEP on 64-bit Support 3
vefatica SETP usually fails with a 32 bit process Support 4
rconn Dropping 32-bit support in Take Command & TCC? Support 14
dcantor How to? Can 32-bit TCC be run on a system with 64-bit TCMD and TCC installed? Support 6
T 32 and 64 bit simultaneous portable versions Support 2
vefatica Make FFIND a bit more friendly? Support 14
CWBillow Everything.exe - 64-bit? Support 8
S 32-bit Take Command v22 install for thumb drive Support 1
Per TCC/LE 14 64-bit won't start on Windows 10 Insider Preview 17063 (171213) Support 12
Joe Caverly SETP and 32-bit process Support 2
gworley How to? Take Command 20 64 bit vs 32 bit Support 1
mikea Documentation Consider expanding the docs for 'Everything' a bit Support 10
T 64 bit TCCLE appears to crash when opening tcc.exe from within tcc.exe window Support 7
vefatica Can a subroutine return a 64-bit integer? Support 4
M 64-bit plugins? Support 1
M An oddity that's a little bit scary... Support 6
rconn News Take Command 16.03.54 32-bit installer Support 0
rconn News Take Command 16.03.54 32-bit installer fix Support 0
MickeyF problem using COM object in VBScript from v16 x64 TCC but not from v15 32-bit TCC Support 4
JohnQSmith Installing TCMD16 on 32 bit XP Support 12
D New 64-bit install goes to Program Files x86 Support 3
F How to install 64-bit after having installed 32-bit on Win7 Support 2
Dan Glynhampton Bad link to 64 bit RC1 download Support 0
M And oddity re the 32-bit TCC on a 64-bit system... Support 4
C Advantages of 32 or 64 bit TCMD in 64 bit Windows 7 Support 3
C How to determine if system is 32 or 64 bit? Support 5
M How to? Identify 64-bit and 32-bit TCC sessions... Support 7
M WAD A bit of strangeness related to Unicode-marked file not being Unicode Support 2
K_Meinhard Take Command v13 64-bit Support 9
K_Meinhard 64-bit installer Support 3
M Another bit of weirdness.... Support 0
M A little bit of strangeness with @Char... Support 3
J CTRL-C does not work on Windows 7 64-bit Support 3
S Take Command LE (32 bit) locking up several times a day Support 14
S 64-bit version use? Support 5
S TCMD 12 64-bit locking up frequently Support 7
rconn v12 Release Build test - 32-bit fixed Support 36
Ville 64-bit command line apps invisible in TCC Support 2
gschizas TaskDialog doesn't work in 64-bit Take Command Support 1
D Settings not writting to registry in XP (32 bit) Support 10
M A minor complaint... Support 9
M WAD A complaint regarding a very irritating TCC installation behavior... (Bug?) Support 4
M WAD A small complaint re. Take Command and file (and particularly directory) handles... Support 21
S DEL on FTP site : complaint about missing DESCRIPT.ION Support 1
L Complaint about the new forum Support 7
A Limitation regarding creation of shortcut keys for "copy" Support 0
M How to? An admittedly somewhat silly question regarding elevation... Support 2
M Just a verification regarding "Iff" and both "status test(s)" and "relational expression(s)"... Support 3
M How to? Just verification for what I think I know regarding "Function"... Support 4

Similar threads