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.22.2.4 -r1.22.2.5 --- openacs-4/packages/calendar/www/view-one-day-display.tcl 10 Feb 2004 22:00:53 -0000 1.22.2.4 +++ openacs-4/packages/calendar/www/view-one-day-display.tcl 4 Apr 2004 23:06:18 -0000 1.22.2.5 @@ -115,18 +115,17 @@ set ansi_start_date [lc_time_system_to_conn $ansi_start_date] set ansi_end_date [lc_time_system_to_conn $ansi_end_date] - set start_hour [lc_time_fmt $ansi_start_date "%H"] - set end_hour [lc_time_fmt $ansi_end_date "%H"] set start_time [lc_time_fmt $ansi_start_date "%X"] set end_time [lc_time_fmt $ansi_end_date "%X"] - regexp {([0-9][0-9]*)} $start_hour match start_hour_no - regexp {([0-9][0-9]*)} $end_hour match end_hour_no + if {($start_hour == $end_hour) || ($end_minutes > 0)} { + incr end_hour + } for { set item_current_hour $start_hour } { $item_current_hour < $end_hour } { incr item_current_hour } { set item_current_hour [expr [string trimleft $item_current_hour 0]+0] - if { $start_hour_no == $item_current_hour } { + if { $start_hour == $item_current_hour } { lappend day_items_per_hour \ [list $item_current_hour $name $item_id $calendar_name $status_summary $start_hour $end_hour $start_time $end_time] @@ -198,7 +197,7 @@ if {$day_current_hour < $end_display_hour } { # need to add dummy entries to show all hours - for { } { $day_current_hour <= $end_display_hour } { incr day_current_hour } { + for { } { $day_current_hour < $end_display_hour } { incr day_current_hour } { set localized_day_current_hour [lc_time_fmt "$current_date $day_current_hour:00:00" "%X" [ad_conn locale]] multirow append day_items_with_time "[subst $hour_template]" $day_current_hour $localized_day_current_hour "" "" "" "" "" 0 0 "" }