-dave
Does this do what you want?
proc yesterday {} {
set day [expr 24 * 60 * 60] # seconds in one day
set now [clock seconds]
return [expr $now - $day]
}
puts [clock format [yesterday] -format "%Y.%m.%d"]
--
Daniel Fackrell (unle...@learn2think.org)
When we attempt the impossible, we can experience true growth.
Actually, you can probably get by just with:
clock format [clock scan "yesterday"]
Along with whatever [clock format ... -format] option you want.
- Ken Jones, President
Avia Training and Consulting
www.avia-training.com
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
Beware! This will do strange things on the days that
daylight savings time begins and ends.
--Joe English, who has been bitten by this before...
isn't
set yesterday [clock scan "1 day ago"]
better ??
> >
> >Does this do what you want?
> >
> >proc yesterday {} {
> > set day [expr 24 * 60 * 60] # seconds in one day
> > set now [clock seconds]
> > return [expr $now - $day]
> >}
>
> Beware! This will do strange things on the days that
> daylight savings time begins and ends.
>
> --Joe English, who has been bitten by this before...
>
> jeng...@flightlab.com
--
Mike Hoegeman Habanero Technologies, LLC
http://habanerotech.net/personal-pages/mh/contact.html
Noted. I'll add this to my growing plethora of reasons to hate Daylight
Savings.