See http://purl.org/tcl/home/man/tcl8.4/TclCmd/clock.htm for the formal man page. Example: %clock format [clock seconds] -format %Y-%m-%dT%H%M%S returns an ISO8601 [http://en.wikipedia.org/wiki/Iso8601] formatted timestamp, such as: 2006-06-24T09:48:29 ---- [JMN] 2006-06-24 [[clock format]] doesn't directly allow you to produce an ISO8601 timestamp that includes fractional seconds - you have to tack that on yourself because [[clock format]] expects an integer number of seconds. I guess you can just grab the last 3 digits of [[clock milliseconds]] and tack them on with the '.' separator. ---- Recent implementations (e.g Tcl 8.5a4) of [[clock format]] show a fivefold slow-down in comparison to Tcl 8.4. e.g now roughly 0.5 milliseconds per [[clock format]] on an old 400MHZ machine While I understand this is due to the long overdue [Reworking the clock command] - and the current implementation is pure Tcl.. Can we expect an improvement of the performance of this? I think this is actually quite important. Many systems use timestamps extensively - and also need to extract fields (year,minute etc) relatively quickly. e.g Logging systems, mail handling protocols, certain object-oriented models. ---- [[clock format]] in Tcl8.5 now accepts extra options such as -timezone. See http://purl.org/tcl/home/man/tcl8.5/TclCmd/clock.htm for the formal man page. ---- See also: [clock] & Parsing ISO8601 dates and times [http://mini.net/tcl/13094] ---- ---- [[ [Category Command] | [Category Date and Time] ]]