Re: time calculation



Bruce Hartweg wrote:
keithv wrote:

* Tong * wrote:

% clock format [expr {([clock scan 09:51:16] - [clock scan 00:00:00])}] -format "%H:%M:%S"
04:51:16

I'd think the result'd be 09:51:16, why 04:51:16?


Timezone issues. Try formatting in the neutral GMT timezone:

clock format [expr {([clock scan 09:51:16] - [clock scan 00:00:00])}]
-format "%H:%M:%S" -gmt 1

Keith


That only hides the problem for a little bit.
It'll still be bogus is the value is more than 24 hours.

clock format $interval -format "%j Days %H:%M:%S" -gmt 1

fixed for one year, reaply your complaint after one year ;-)

Bruce
uwe

.