--- ui.itcl	2004-03-21 12:05:21.000000000 -0800
+++ /home/ccwf/src/TiVo/TivoWebPlus-ccwf/ui.itcl	2005-01-29 12:26:16.000000000 -0800
@@ -4401,12 +4401,14 @@
     puts $chan [tr "" [td [html_link "/history/list/-5,0" "Past 5 days"]]]
     puts $chan [tr "" [td [html_link "/history/list/past" "All past"]]]
     puts $chan [tr "" [td [html_link "/history/list/all" "All"]]]
+    puts $chan [tr "" [td [html_link "/history/list/expired" "Expired"]]]
     puts $chan [html_table_end]
     puts $chan [html_end]
     return
   } else {
     set spath [split $path /]
     set path [join [lrange $spath 1 end] /]
+    set expiredOnly 0
     switch -exact [lindex $spath 0] {
       detail {
         action_history_detail $chan $path $env
@@ -4431,6 +4433,12 @@
             set maxtime $now
           }
 
+	  expired {
+	    set mintime 0
+	    set maxtime $now
+	    set expiredOnly 1
+	  }
+
           default {
             set range [split $path ,]
             set mintime [expr $now + [lindex $range 0] * 86400]
@@ -4459,6 +4467,8 @@
       RetryTransaction {
         set rec [db $db openid $fsid ]
         set creason [dbobj $rec get CancelReason]
+	set cdate [dbobj $rec get CancelDate]
+	set ctime [dbobj $rec get CancelTime]
         set show [dbobj $rec get Showing]
         history_showinfo $show inf
         set id [dbobj $inf(program) get TmsId]
@@ -4483,6 +4493,7 @@
         default { set reason [lindex $cancelreasons [expr $creason - 1]] }
       }
 
+      if {! $expiredOnly || $reason == "Expired"} {
       if {$findalt == 1 && $inf(isEpisode) && $id != ""} {
         set alt [alt_showing $id $id2]
         if {$alt == ""} {
@@ -4499,9 +4510,14 @@
         }
       }
 
+	if {$reason == "Expired"} {
+	  set csecs [expr $cdate * 86400 + $ctime + $tzoffset]
+	  set reason [clock format $csecs -format "Exp %m/%d %H:%M:%S"]
+	}
       puts $chan [tr "" [td $inf(day)] [td $inf(date)] [td "ALIGN=RIGHT NOWRAP" $inf(time)] [td $inf(channel)] [td $inf(title)] [td $inf(episode)] [td $reason]]
     }
   }
+  }
 
   puts $chan [html_table_end]
   puts $chan [html_end]

