Forum OpenACS Development: Calendar Appointments over a Server with differente GMT

Hello

Perhaps this is a simple question. Yesterday I upgraded calendar package. Al my appointments move 6 hours upwards (I have 6 hours between my local zone GMT+1 and GMT-5 of my server.

Now, If I make an appointment, for example for 09:00, it appears directly at 03:00 AM.

This only occurs in day view only (not in list or week view).

Is this a bug, or perhaps I have a mis configuration.

Thanks and thanks por Calendar package, it is great, I use it as my daily agenda.

Cesareo

Hello Cesareo,

I have seen some functions that convert the server time to the user's local time if then have set their timezone information with the server. Maybe that is not set for call calendar views.

Hello Nagita

But the problem it is after an upgrade to a new calendar version. It seems to be a problem with the upgrade and not with the function.

Thanks. Anybody can help me? May be sounds a bit tricky but I thing it is a problem with time configuration and not with code. I don't know how to solve this.

Thanks
Cesáreo

Take a look what is in the database table (acs_items otoh). What's there?
Hello Dirk

What's the name of the DB table?.

I put all combinations of acs_items and otoh and it doesn't exist. It's the first time I connect to DB in this server (It doesn't work \d command neither sql-postgres with emacs in my server)

Cesareo

There is no acs_items table. He may be referring to cr_items table.
I was referring to acs_events (sorry!) and timespans and time_intervals. Run the queries from the calender xql files to find out the times that are stored in the database.

From which OpenACS version to which one did you upgrade? Database?

Hello Dirk

Sorry about my delay.

I run this sql query (I've done an extract from views-postgresql.xql file)

select distinct e.name as name, 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 from acs_activities a,acs_events e,timespans s,time_intervals t,calendars cals,cal_items ci left join cal_item_types cit on cit.item_type_id = ci.item_type_id where e.timespan_id = s.timespan_id and s.interval_id = t.interval_id and e.activity_id = a.activity_id and ci.cal_item_id= e.event_id and e.event_id=7548;

Result is:
name | ansi_start_date | ansi_end_date
--------------------------+---------------------+---------------------
Revisar Error Calendario | 2005-01-08 11:00:00 | 2005-01-08 12:00:00

event_id 7548 was created ad-hoc, and original time was 17:00 to 18:00, and so appears in list, week, and month view. Problem is only in day view

Also, I think problem is in (HTML DOM: td with class: cal-day-time) because (HTML DOM: td with class: cal-day-event) shows the right hour. Example:

11:00 Revisar Error Calendario (17:00 - 18:00) Personal

Regards
Cesáreo

Collapse
Posted by Ben Koot on
I have a similar problem, and on checking the localization section in my adminpanel I noticed the message:

"Couldn't get time from timeanddate.com, sorry." Is OACS interfaced with Timeand date? That would mean it would automaticaly create usefull solutions like http://www.timeanddate.com/worldclock/meeting.html.

Or is this a bug??

Thanks

Ben

Hello Everybody

Today, I have observed a similir misfuntioning with calendar. I think probably it is the same problem.

I do an appointment (repetitive) and it occurs the problem we are viewing in this thread. When I'm going to edit the event (only with repetitive events) its start/end hour varies (in the same manner).

I don't want to distract ourselves of principal problem, but it occurred today and perhaps helps to solve it.

Regards.
Cesáreo

I don't know if there's a bug in calendar, but if there is take a look at this thread to see my proposed solution OpenACS Q&A: Notification of Calendar Events
Hello

I have been viewing my error.log and I have some lines as:

[13/Jan/2005:10:21:59][1515.49156][-conn:openacs::0] Warning: lc_numeric: acs-lang.localization-grouping key has inval\
id value -1 -1 for locale

I don't know what is this, perhaps my calendar problem depends on this? could it be a misconfiguration?

Thanks
Cesáreo

Hello

I would like to know if finally, this is a bug in calendar package or some misconfiguration of my own.

I have also observed that if I give read permission to "The Public" in a calendar, all appointments appeears with a GMT diference (between client and server) when "The Public" reads the events.

Cesareo

Have a look at this commit please: http://cvs.openacs.org/cvs/openacs-4/packages/calendar/www/view-one-day-display.tcl?r1=1.6&r2=1.7

Could this be the source of your problem? I.e. the upgrade scripts don't take into account this "recalculation"?

Hello Dirk

But I have version 1.30 ( I think the last one). You are posting cvs from 1.7 or 1.6 version, I don't understand it. I think it is a problem with this version not with past versions.

But, firstly the question is if this problemm only occurs to me, if anybody have had this problem with calendar package then it is a problem of mine not the code.

Regards
Cesareo

I posted it because back then something changed with the calculation of the time given to the user - and that could have been the problem.

Did you change anything in your local calendar code?

The events start times within the database - are they different after the upgrade from what they have been before?

Hello

I didn't change anything in calendar code. I have only changed localization parameters.

Localization Parameters (System):
SiteWideLocale: es_ES
SystemTimezone: America/New_York
sePackageLevelLocalesP: 0 (I don't remember if I changed this)

In user:

Your Preferred Locale: Spanish (ES)
Your Timezone: Europe/Madrid

Remember than problem is than events has 6 hours of difference (system: GMT-5, me GMT+1)

Thanks for your attention and readyness.
Cesareo