Index: openacs-4/packages/calendar/www/view-one-day-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-one-day-display.tcl,v diff -u -r1.36.2.1 -r1.36.2.2 --- openacs-4/packages/calendar/www/view-one-day-display.tcl 23 May 2008 21:19:00 -0000 1.36.2.1 +++ openacs-4/packages/calendar/www/view-one-day-display.tcl 29 May 2008 14:08:31 -0000 1.36.2.2 @@ -91,7 +91,7 @@ # Loop through the items without time -set additional_limitations_clause " and to_char(start_date, 'HH24:MI') = '00:00' and to_char(end_date, 'HH24:MI') = '00:00'" +set additional_limitations_clause " and to_char(start_date, 'HH24:MI') = to_char(end_date, 'HH24:MI')" if { [exists_and_not_null cal_system_type] } { append additional_limitations_clause " and system_type = :cal_system_type " } @@ -142,11 +142,11 @@ incr bump_right_base $bump_right_delta } -set additional_limitations_clause " and (to_char(start_date, 'HH24:MI') <> '00:00' or to_char(end_date, 'HH24:MI') <> '00:00')" +set additional_limitations_clause " and to_char(start_date, 'HH24:MI') <> to_char(end_date, 'HH24:MI')" if { [exists_and_not_null cal_system_type] } { append additional_limitations_clause " and system_type = :cal_system_type " } -set order_by_clause " order by to_char(start_date,'HH24')" +set order_by_clause " order by to_char(start_date,'HH24:MI')" set day_items_per_hour {} set adjusted_start_display_hour $start_display_hour @@ -168,6 +168,9 @@ set start_time [lc_time_fmt $ansi_start_date "%X"] set end_time [lc_time_fmt $ansi_end_date "%X"] + set start_hour [format %.0f [lc_time_fmt $ansi_start_date "%H"]] + set end_hour [format %.0f [lc_time_fmt $ansi_end_date "%H"]] + if { $start_hour < $adjusted_start_display_hour && \ [string equal \ [string range $ansi_start_date 0 9] \