Index: openacs-4/packages/calendar/www/view-week-display-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-week-display-postgresql.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/calendar/www/view-week-display-postgresql.xql 12 Sep 2003 20:00:13 -0000 1.5 +++ openacs-4/packages/calendar/www/view-week-display-postgresql.xql 21 Sep 2003 22:14:45 -0000 1.6 @@ -22,6 +22,8 @@ coalesce(e.name, a.name) as name, coalesce(e.status_summary, a.status_summary) as status_summary, e.event_id as item_id, + (to_date(start_date,:ansi_date_format) - to_date(:first_weekday_of_the_week_tz, + :ansi_date_format)) as day_of_week, (select type from cal_item_types where item_type_id= cal_items.item_type_id) as item_type, cals.calendar_id, cals.calendar_name @@ -35,8 +37,8 @@ and s.interval_id = t.interval_id and e.activity_id = a.activity_id and start_date between - to_date(:first_weekday_of_the_week_system, :ansi_date_format) and - to_date(:last_weekday_of_the_week_system, :ansi_date_format) + to_date(:first_weekday_of_the_week_tz, :ansi_date_format) and + to_date(:last_weekday_of_the_week_tz, :ansi_date_format) 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 @@ -51,7 +53,7 @@ as day_of_the_week, cast(next_day(to_date(:start_date, 'YYYY-MM-DD') - cast('7 days' as interval), :first_us_weekday) as date) as first_weekday_date, -to_char(next_day(to_date(:start_date, 'YYYY-MM-DD') - cast('7 days' as interval), :first_us_weekday),'J') +to_char(next_day(to_date(:start_date, 'YYYY-MM-DD') - cast('7 days' as interval), :first_us_weekday),'J') as first_weekday_julian, cast(next_day(to_date(:start_date, 'YYYY-MM-DD') - cast('7 days' as interval), :first_us_weekday) + cast('6 days' as interval) as date) as last_weekday_date,