Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d87aeeec4a9bf37c68ddc746ec47c6a9b440112b
Ticket: 2531126fffffffffffffffffffffffffffffffff
[file copy] does not accurately copy timestamps (unix)
User & Date: danckaert on 2009-01-26 19:34:24
Changes

  1. icomment:
    The new POSIX standard actually marks utime() as obsolete:
    http://www.opengroup.org/onlinepubs/9699919799/functions/utime.html
    It also specifies a new utimensat() function for dealing with nanosecond timestamps.
    Using utimes() would only be an intermediate solution, since it can only handle microseconds, not nanoseconds.
    
    Supporting nanosecond timestamps in Tcl should probably be part of a larger effort, also involving the [file mtime] and [file stat] etc commands. I had a look at the source code, and it seems this would be quite complicated. The problem is that Tcl always keeps pointers to the OS' native stat structure, which would require dependencies on ST_MTIM_NSEC and HAVE_UTIMENSAT spread out over the code.
    It would be easier if Tcl had its own stat structure, in which the nanosecond fields could simply be set to zero if they are not supported on the OS.
    
    In any case, it's fine for me if this item is closed.
    
    
    
  2. login: "danckaert"
  3. mimetype: "text/plain"
  4. username: "danckaert"