|
I think this is what's happening then. I'm *guessing* the timestamp was saved in its real time (without a DST modifier) when DST was on. Presumably, the command window was smart enough to know DST is on and therefore adjusted the timestamps when shown on the fly. However, now that DST is off, it doesn't. Which is all fine and dandy except 9:40 didn't really exist back when that file was modified.
Any new changes, using the same logic, would be ok simply because DST off is off. So all good and the command processor doesn't need to be as smart as explorer.
To get around this, you're pretty much screwed bro. Best I think you can do in a batch file / script is just figure out if your date is within certain dates from when DST switches on and off and then account for it. It's hard coded. It's nasty. Not sure of anything else though.
And of course write a strongly written letter to MS for not storing timestamps in UTC.
Jeremy Falcon
|
|
|
|
|
Why do Explorer and the command prompt interpret file times differently? – The Old New Thing[^]
Explorer is showing the timestamp using the DST settings which were in effect when the timestamp was created. Powershell does the same.
The venerable command prompt is showing the timestamp using the DST settings which are in effect now. And as Raymond said, fixing that minor display bug would carry too much risk of breaking something else.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Gotcha.
I'd be ok with that risk though.
Jeremy Falcon
|
|
|
|
|
|
|
Wow. That's a lot of work. Appreciated.
I'd have to apply that to each file in the folder.
I might just get them to turn DST on manually when they run a script for now.
I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day.
John Simmons / outlaw programmer
|
|
|
|
|
Good luck man, would be interested to hear the solution you come up with.
Jeremy Falcon
|
|
|
|
|
Firs of all: Are we really talking DOS here, or the NT command prompt? Those two are technologically distinct.
|
|
|
|
|
It's the CMD window. Clock is correct, new files are ok, just ones from before time change are different in CMD dir.
I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day.
John Simmons / outlaw programmer
|
|
|
|
|
Have you tried possibly correcting the time in the bios?
Think I once had an ancient dell with similar issues
|
|
|
|
|
I see a similar problem
One of my vb programs checks to make sure all its files are up to date and then copies in updates using xcopy if necessary
I haven't noticed a pattern yet in the PCs it happens to but sometimes the program tries to update at every start. When I check I find the file is identical but the timestamp is one hour out so I manually copy using explorer and everything is happy again
|
|
|
|
|
This has been a problem for over a decade. I particularly see it with networked drives. If I have the same file on a local drive and on a networked drive, the file timestamps are off by one hour for 6 months of the year.
File timestamps should only be valid in GMT. Let the final software call an OS function to convert it to local time just before displaying the file time.
It's when the OS tries to be too smart that the problem arises. Some BIOS can automatically adjust for DST. But so can the OS. I believe the problem is when one drive is already automatically adjusted, but another drive is not. As in local drive versus networked drive.
|
|
|
|
|
I hate the timestamps. It drives me batty to see a Modified Date earlier than the Created Date.
Yes, I know how that happens, but it still drives me crazy.
|
|
|
|
|
|
Can you make a snooker table laugh by putting your hand in its pocket and tickling its balls?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
modified 15-Nov-16 13:49pm.
|
|
|
|
|
OriginalGriff wrote: it's Oh, you naughty boy, you!
Why is it that forringers never make that mistake?
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Fixed.
In my defence, I have a cold and my brain is only just ticking over ... it won't rev at all without misfiring ...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
The other one is still wrong.
The United States invariably does the right thing, after having exhausted every other alternative. -Winston Churchill
America is the only country that went from barbarism to decadence without civilization in between. -Oscar Wilde
Wow, even the French showed a little more spine than that before they got their sh*t pushed in.[^] -Colin Mullikin
|
|
|
|
|
OK, so maybe it isn't even ticking over very reliably either...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
But he gets a mark for consistency.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Rules for the FOSW ![ ^]
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
I'll cue that into my list of things to try
Sin tack ear lol
Pressing the "Any" key may be continuate
|
|
|
|
|
Get a cue - snooking isn't allowed here!
Urban Dictionary: snooks (3rd definition)[^]
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
If it's female you can stroke the triangle
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
They do have soft carpeting.
|
|
|
|