I've just noticed that the $DOWNSECS variable seems to be wrong. I've seen lots of times that it's 0. I found one time today where the history page says the duration was 1:49:57, but $DOWNSECS in the recovery message was set to 48. I don't know when this started, but I've got odd recovery times going back a couple of weeks.