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.35 -r1.35.2.1 --- openacs-4/packages/acs-templating/tcl/date-procs.tcl 12 Mar 2005 21:39:59 -0000 1.35 +++ openacs-4/packages/acs-templating/tcl/date-procs.tcl 23 Jun 2005 12:39:45 -0000 1.35.2.1 @@ -289,14 +289,7 @@ } set pad "00" } - - # DRB: We need to differentiate between date and timestamp, for PG, at least, - # and since Oracle supports to_timestamp() we'll just do it for both DBs. - if { [llength $date] <= 3 } { - return "to_date('$value', '$format')" - } else { - return "to_timestamp('$value', '$format')" - } + return "to_date('$value', '$format')" } ansi { # LARS: Empty date results in NULL value @@ -1028,6 +1021,10 @@ set tokens [list] + if {[info exists attributes(id)]} { + set id_attr_name $attributes(id) + } + while { ![string equal $format_string {}] } { # Snip off the next token @@ -1045,6 +1042,10 @@ set fragment_def $template::util::date::fragment_widgets([string toupper $token]) set fragment [lindex $fragment_def 1] + if {[exists_and_not_null id_attr_name]} { + set attributes(id) "${id_attr_name}.${fragment}" + } + append output [template::widget::[lindex $fragment_def 0] \ element \ $fragment \