Mailing List Archive

foreign key constraint "calendar_item_tz_id_fkey"
Hi,

I'm getting an error when adding a Meeting request created by Outlook,
and imported using Evolution into davical-0.9.7.6-0

The error is cause because Outlook sends the timezone as:

BEGIN:VTIMEZONE
TZID:Eastern Time (US & Canada)
X-MICROSOFT-CDO-TZID:10

but the only timezone in the time_zone table is:

"/freeassociation.sourceforge.net/Tzfile/America/New_York";"America/New_York";"BEGIN:VTIMEZONE
TZID:/freeassociation.sourceforge.net/Tzfile/America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:STANDARD
TZNAME:EST
DTSTART:19701107T010000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
BEGIN:DAYLIGHT
TZNAME:EDT
DTSTART:19700314T030000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
END:VTIMEZONE
"

Is there something that's supposed to happen when an unknown timezone
shows up in a meeting request, or should the time_zone table already be
populated with all possible time zones?

Thanks!

Terry
foreign key constraint "calendar_item_tz_id_fkey" [ In reply to ]
On Tue, 2010-01-12 at 16:16 -0500, Terry Carmen wrote:
> Hi,
>
> I'm getting an error when adding a Meeting request created by Outlook,
> and imported using Evolution into davical-0.9.7.6-0
>
> The error is cause because Outlook sends the timezone as:
>
> BEGIN:VTIMEZONE
> TZID:Eastern Time (US & Canada)
> X-MICROSOFT-CDO-TZID:10
>
> but the only timezone in the time_zone table is:
>
> "/freeassociation.sourceforge.net/Tzfile/America/New_York";"America/New_York";"BEGIN:VTIMEZONE
> TZID:/freeassociation.sourceforge.net/Tzfile/America/New_York
> X-LIC-LOCATION:America/New_York
> BEGIN:STANDARD
> TZNAME:EST
> DTSTART:19701107T010000
> RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
> TZOFFSETFROM:-0400
> TZOFFSETTO:-0500
> END:STANDARD
> BEGIN:DAYLIGHT
> TZNAME:EDT
> DTSTART:19700314T030000
> RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
> TZOFFSETFROM:-0500
> TZOFFSETTO:-0400
> END:DAYLIGHT
> END:VTIMEZONE
> "
>
> Is there something that's supposed to happen when an unknown timezone
> shows up in a meeting request, or should the time_zone table already be
> populated with all possible time zones?

It's a bit of a mess.

For most timezones I manage to extract some information to match the
Olsen timezone name which I can then use to tell PostgreSQL what
timezone a date is in.

Unfortunately there are a few pieces of proprietary software which I
don't have access to, which use timezones that I have no way of
translating programmatically.

Eventually there will probably have to be a lookup table of some kind so
that the translation can happen more reliably, so that DAViCal can know
that "Eastern Time (US & Canada)" means "America/New_York".

You should be able to insert a row into the time_zone table in the
database with the tz_id column set to "Eastern Time (US & Canada)" and
the tz_locn column set to "America/New_York" and the tz_spec column
containing the timezone data, i.e. something like:

'BEGIN:VTIMEZONE
TZID:Eastern Time (US & Canada)
X-LIC-LOCATION:America/New_York
BEGIN:STANDARD
TZNAME:EST
DTSTART:19701107T010000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
BEGIN:DAYLIGHT
TZNAME:EDT
DTSTART:19700314T030000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
END:VTIMEZONE
'

Make sure that whatever timezone definition you put in there is correct,
and the TZID: line matches the tz_id column.

After that is done you should stop getting the errors, I think.

Cheers,
Andrew.

------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com +64(272)DEBIAN
The time is right to make new friends.
------------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.morphoss.com/pipermail/davical-users/attachments/20100113/fe91ec0c/attachment.pgp>
-------------- next part --------------
foreign key constraint "calendar_item_tz_id_fkey" [ In reply to ]
On Wed, 2010-01-13 at 13:03 +1300, Andrew McMillan wrote:
> On Tue, 2010-01-12 at 16:16 -0500, Terry Carmen wrote:
> > Hi,
> >
> >RULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
> TZOFFSETFROM:-0500
> TZOFFSETTO:-0400
> END:DAYLIGHT
> END:VTIMEZONE
> '
>
> Make sure that whatever timezone definition you put in there is correct,
> and the TZID: line matches the tz_id column.
>
> After that is done you should stop getting the errors, I think.
>
> Cheers,

That should do it. I just wasn't sure if it was something I needed to
fix up manually, or if I was missing some sort of config.

Thanks for the help!

Terry