Index: openacs-4/packages/calendar/www/view-one-day-display-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/view-one-day-display-postgresql.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/calendar/www/view-one-day-display-postgresql.xql 13 Aug 2003 16:08:33 -0000 1.6 +++ openacs-4/packages/calendar/www/view-one-day-display-postgresql.xql 14 Aug 2003 15:44:08 -0000 1.7 @@ -5,9 +5,7 @@ - select to_char(start_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_start_date, - to_char(end_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_end_date, - coalesce(e.name, a.name) as name, + select coalesce(e.name, a.name) as name, coalesce(e.status_summary, a.status_summary) as status_summary, e.event_id as item_id, (select type from cal_item_types where item_type_id= cal_items.item_type_id) as item_type, @@ -23,8 +21,8 @@ and s.interval_id = t.interval_id and e.activity_id = a.activity_id and start_date between - to_date(:current_date,:date_format) and - to_date(:current_date,:date_format) + cast('23 hours 59 minutes 59 seconds' as interval) + to_date(:current_date_system,:ansi_date_format) and + to_date(:current_date_system,:ansi_date_format) + cast('23 hours 59 minutes 59 seconds' as interval) and cal_items.cal_item_id= e.event_id and to_char(start_date, 'HH24:MI') = '00:00' and to_char(end_date, 'HH24:MI') = '00:00' @@ -37,10 +35,8 @@ - select to_char(start_date, 'HH24') as start_hour, - to_char(end_date, 'HH24') as end_hour, - to_char(start_date, 'HH24:MI') as start_time, - to_char(end_date, 'HH24:MI') as end_time, + select to_char(start_date, :ansi_date_format) as ansi_start_date, + to_char(end_date, :ansi_date_format) as ansi_end_date, coalesce(e.name, a.name) as name, coalesce(e.status_summary, a.status_summary) as status_summary, e.event_id as item_id, @@ -57,16 +53,16 @@ and s.interval_id = t.interval_id and e.activity_id = a.activity_id and start_date between - to_date(:current_date,:date_format) and - to_date(:current_date,:date_format) + cast('23 hours 59 minutes 59 seconds' as interval) + to_date(:current_date_system,:ansi_date_format) and + to_date(:current_date_system,:ansi_date_format) + cast('23 hours 59 minutes 59 seconds' as interval) and cal_items.cal_item_id= e.event_id -and to_char(start_date, 'HH24:MI') <> '00:00' -and to_char(end_date, 'HH24:MI') <> '00:00' +and (to_char(start_date, 'HH24:MI') <> '00:00' or + to_char(end_date, 'HH24:MI') <> '00:00') and cals.package_id= :package_id and (cals.private_p='f' or (cals.private_p='t' and cals.owner_id= :user_id)) and cals.calendar_id = ci.on_which_calendar and e.event_id = ci.cal_item_id -order by start_hour +order by to_char(start_date,'HH24') @@ -82,5 +78,4 @@ -