Index: openacs-4/packages/acs-templating/tcl/date-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/date-procs.tcl,v diff -u -r1.27.2.5 -r1.27.2.6 --- openacs-4/packages/acs-templating/tcl/date-procs.tcl 8 Jul 2004 04:10:39 -0000 1.27.2.5 +++ openacs-4/packages/acs-templating/tcl/date-procs.tcl 11 Nov 2004 22:40:55 -0000 1.27.2.6 @@ -452,6 +452,13 @@ return $date } else { set hours [lindex $date 3] + + # robustness check: make sure we handle form of 08:00am --jfr + regexp {0([0-9])} $hours match trimmed_hours + if {[exists_and_not_null trimmed_hours]} { + set hours $trimmed_hours + } + if { [string equal $value pm] && $hours < 12 } { return [lreplace $date 3 3 [expr $hours + 12]] } elseif { [string equal $value am] } {