I'm not sure about your final code, if it's :
alias datestampchans {
var %scon = $scon(0)
while (%scon) {
scon %scon
var %chan = $chan(0)
while (%chan) {
echo -gt $chan(%chan) ---- Date switching to $date ----
dec %chan
}
dec %scon
}
.timerdatestamp -o 00:00 1 1 datestampchans
}
This is my version, so as you said, the last value of %scon is 1 here, the timer will be run on scon 1, but with your version, the last value of %scon is $scon(0) and the timer is run from this scon.So if you're using your version, the timer is set on scon $scon(0), and not scon 1 (I've tested.)
If you're checking on which scon the timer is set on, try to don't use echo -a in your test if you use it, rather echo -s.