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 -N -r1.53 -r1.54 --- openacs-4/packages/acs-templating/tcl/date-procs.tcl 6 Apr 2018 15:12:00 -0000 1.53 +++ openacs-4/packages/acs-templating/tcl/date-procs.tcl 7 Apr 2018 17:45:51 -0000 1.54 @@ -472,9 +472,10 @@ 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 {([info exists trimmed_hours] && $trimmed_hours ne "")} { - set hours $trimmed_hours + if {[regexp {0([0-9])} $hours match trimmed_hours]} { + if {$trimmed_hours ne ""} { + set hours $trimmed_hours + } } if { $value eq "pm" && $hours < 12 } { @@ -1056,7 +1057,7 @@ set fragment_def $template::util::date::fragment_widgets([string toupper $token]) set fragment [lindex $fragment_def 1] - if {([info exists id_attr_name] && $id_attr_name ne "")} { + if {[info exists id_attr_name] && $id_attr_name ne ""} { set attributes(id) "${id_attr_name}.${fragment}" }