Forum OpenACS Q&A: Events module - event-edit.tcl doesn't post the time values to events.edit-2.tcl

When you want to update event-edit.tcl, event-edit-2.tcl doesn't
receive the values for the dates and sets them default to 00:00:00.
There must be a problem with the ns_dbformvalueput or something like
that.
David,

  I just came across this problem, also.  Did you ever get this
figured out?

Thanks.

Hello Chris,

this is a highly complex procedure travel... We didn't figure out how to fix the "AM / PM - time" problem because nobody knows what AM PM is in Germany. We replaced it with a 24h timestamp.

The time data travels through quite some procs that you will find inside "/tcl/ad-aolserver-3.tcl.preload":

in event-edit.tcl you start with

1. set stuffed_with_start [ns_dbformvalueput $time_elements "start_time" "timestamp" $start_timestamp]
set stuffed_with_se [ns_dbformvalueput $stuffed_with_start "end_time" "timestamp" $end_timestamp]
set stuffed_with_all_times [ns_dbformvalueput $stuffed_with_se "reg_deadline" "timestamp" $deadline_timestamp]

2. ns_dbformvalueput (the type is timestamp)

3. ns_parsesqltimestamp (now it gets a little strange for beginners like us - pay attention to opt = time - there is a "-" and not like in ampm a "{return [ns_parsesqldate $opt [lindex [split $sqltimestamp " "] 0]]}" which lets the data go to ns_parsesqldate...


We inserted new options in three procs:
1. ns_dbformvalueput - we exhanged the following
set retval [ns_formvalueput $retval ColValue.[ns_urlencode $column].time
[ns_parsesqltimestamp time $value]]
set retval [ns_formvalueput $retval ColValue.[ns_urlencode $column].ampm
[ns_parsesqltimestamp ampm $value]]
into
set retval [ns_formvalueput $retval ColValue.[ns_urlencode $column].time
[ns_parsesqltimestamp time24 $value]]

2.) ns_parsesqltimestamp - we added one line:
time24 {return [ns_parsesqltime $opt [lindex [split $sqltimestamp " "] 1]]}

3.) ns_parsesqltime - we added three lines:
time24 {
return [format "%d:%02d" $hours $minutes]
}

It works for us now....

Maybe you could fix the am/pm thing and Roberto could use it inside the 3.2.5 Release?!
this is my drivers licence number forward at the beginning and in reverse at the end i use my birthdat for blank spaces that is after the first i do 12 space bars then enter the search term then 2 spaces afetr and before the reverse licence number

ok i cant type to good or spool

http://www.google.com/search?hl=en&lr=&q=30+76+38+3++++++++++++71+68+75+214%095+t++3+83+67+03&btnG=Search

as always
edward anthony

god bless
peace!

http://vle176.com