caesar wrote:I've found something: set result [clock format [expr [clock scan $date] - [clock scan $expire]] -format {%m %d}]
but I'm getting the result like this: 01 15 (months, days) so, in fact the difference betwen them is 15 days.. not 1 month and 15 days. Any sugestions?
The clock format does not tell it is 1 month *and* 15 days. It tells you that the number you asked to be formatted is January 15.
By subtracting the two numbers you get the number of seconds since the unix clock started: 1209600 seconds in your case.
The number you feed into [clock format] is the number of seconds since 01/01/1970 00:00 GMT.
Which in your case is 15 days into the first month since "01/01/1970 00:00 GMT". So, what you are seeing is 15/01/1970 00:00 GMT.
What you can use is [duration] which takes a relative number.