Artifacts Associated With Ticket 926106ffffffffff
Ticket change [19b557592c] (rid 122839) by tommesch on 2004-03-30 16:25:01:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Tcl version: 8.4.5 System: Win2k/WinXP If I do a stat on "c:\programs" the element ctime in stat array depends on the month i do the stat call. If I do at march 1st: file stat "c:\programs" stat puts $stat(ctime) I get a 3600 different result I as do that a may 1st. One can simply check that by setting system date 2 monthes back and repeat the test.
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "tommesch"
- subsystem initialized to: "37. File System"
- title initialized to: "file stat -> ctime is summertime dependant"
- type initialized to: "Bug"
Ticket change [711bb1c02a] (rid 100615) by vincentdarley on 2004-03-31 05:54:24:
- assignee changed to: "kennykb"
- icomment:
Logged In: YES user_id=32170 I know nothing about such clock issues, assigning to someone who might...
- login: "vincentdarley"
- mimetype: "text/plain"
- title changed to: "file stat -> ctime is summertime dependant"
- username: "vincentdarley"
Ticket change [f84793f581] (rid 91512) by kennykb on 2004-04-08 20:34:27:
- assignee changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=99768 Vince, 'stat' and '__stat64' on Winodws are broken by design. The behavior that the original poster reports is documented in http://support.microsoft.com/?kbid=190315 Since the referenced page characterizes the misfeature pretty well, we can probably figure out how to undo the damage. Don't you love programming around Microsoft?
- login: "kennykb"
- mimetype: "text/plain"
- title changed to: "file stat -> ctime is summertime dependant"
- username: "kennykb"
Ticket change [96715d63ad] (rid 106328) by vincentdarley on 2004-04-19 23:37:46:
- icomment:
Logged In: YES user_id=32170 You can find the volume type (NTFS or not) through the code in tclWinFile.c:TclpFilesystemPathType(), but beyond that fixing this is beyond me (no knowledge of timezone/locale issues), so if someone wants this fixed, please provide a patch.
- login: "vincentdarley"
- mimetype: "text/plain"
- priority changed to: "3 Low"
- title changed to: "file stat -> ctime is summertime dependant"
- username: "vincentdarley"
- icomment:
Ticket change [994d5e9bcb] (rid 110768) by vincentdarley on 2004-09-28 22:39:57:
- assignee changed to: "kennykb"
- icomment:
Logged In: YES user_id=32170 Can any of your recent 'clock' changes be used to do something about this?
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
Ticket change [cb74970b57] (rid 95518) by kennykb on 2004-10-31 09:57:47:
- closedate changed to: "2004-10-31T02:57:47"
- closer changed to: "kennykb"
- icomment:
Logged In: YES user_id=99768 The 'clock' changes are immaterial - the problem all happens in ToCTime in tclWinFile.c. I've committed a fix to the HEAD. I've not backported it to the 8.4 branch because the bug has been around for as long as we've supported Windows, and I'm afraid that there's likely to be legacy code that depends on it. I'm also a bit concerned that this will make [clock format [file mtime $file]] yield a different answer from Windows Explorer - which has the exact same bug. Apparently someone in Redmond thinks that's how it's supposed to work.
- login: "kennykb"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "kennykb"
Ticket change [4203d3d810] (rid 116293) by vincentdarley on 2004-11-01 20:19:54:
- foundin changed to: "obsolete: 8.5a2"
- icomment:
Logged In: YES user_id=32170 The time-reading functions are now ok, but, for example: # copy $from to $to, but using i/o set fin [open $from r] set fout [open $to w] fcopy $fin $fout close $fin close $fout file mtime $to [file mtime $from] #end fails when we're copying across a daylight savings boundary. ('fails' in the sense that the mtime's are different by 1 hour for the 2 files). - login: "vincentdarley"
- mimetype: "text/plain"
- priority changed to: "7 High"
- resolution changed to: "Accepted"
- status changed to: "Open"
- username: "vincentdarley"
Ticket change [84c903f17f] (rid 117624) by vincentdarley on 2004-11-01 21:57:14:
- icomment:
Logged In: YES user_id=32170 Here's a new test for this bug: test cmdAH-24.12 {Tcl_FileObjCmd: mtime and daylight savings} { set name [file join [temporaryDirectory] clockchange] file delete -force $name close [open $name w] set time [clock scan "21:00:00 October 30 2004 GMT"] file mtime $name $time set newmtime [file mtime $name] file delete $name expr {$newmtime == $time ? 1 : "$newmtime != $time"} } {1} - login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [e2ba6ca16c] (rid 87680) by kennykb on 2004-11-02 00:00:12:
- closedate changed to: "2004-11-01T17:00:12"
- closer changed to: "kennykb"
- icomment:
Logged In: YES user_id=99768 I might have known that the native 'utime' procedure would contain a deliberate bug to offset the bug in the native 'stat'. Now we use neither. Thanks for the report and the test case.
- login: "kennykb"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "kennykb"