GCal Connector Web Service : Unknown destintation timezone name

12 views
Skip to first unread message

Morgan

unread,
May 15, 2009, 5:28:57 AM5/15/09
to google-calendar-connectors
Hello Everyone !
I'm trying to install the Calendar Connector Web Service.
I'm configured the G Calendar settings and now I have an exception in
log : "Unknown destintation timezone name."

Timezone is configured on my calendar and for in the admin panel.

[2080] DEBUG GCalExchangeLookup.ExchangeQuerier - Use SSL True
[2080] DEBUG GCalExchangeLookup.ExchangeQuerier - Request URL ****/
GCalExchangeLookup/Exchangequerier.aspx
[2080] DEBUG GCalExchangeLookup.ExchangeQuerier - Referrer URL

[2080] INFO Google.GCalExchangeSync.Library.GCalFreeBusyRequest -
Request received from GCal.
[body=[1,1,[***@*****.com],20090508/20090526,20090515T111440,Europe/
Paris]]

[2080] ERROR GCalExchangeLookup.ExchangeQuerier -
System.TypeInitializationException: Une exception a été levée par
l'initialiseur de type pour
'Google.GCalExchangeSync.Library.Util.OlsonUtil'. --->
Google.GCalExchangeSync.Library.GCalExchangeException: Unknown
destintation timezone name.
à Google.GCalExchangeSync.Library.Util.OlsonUtil.GetTimeZone(String
name)
à Google.GCalExchangeSync.Library.Util.OlsonUtil..cctor()
--- Fin de la trace de la pile d'exception interne ---

Thanks a lot for your help

John Leen

unread,
May 15, 2009, 5:59:48 PM5/15/09
to google-calendar-connectors
Hi Morgan,

This is somewhat puzzling, and certainly not the intended behavior!
Are you equipped to debug the web service from source? The message
you're seeing ("Unknown destination timezone name") is an exception we
throw in src\core\util\OlsonUtil.cs if the time zone isn't recognized
by the freeware TZ4Net library that we use. However, "Europe/Paris" is
certainly a zone that we should recognize. If you're able to debug,
I'd be interested to see if "Europe/Paris" is indeed the argument
that's being passed to OlsonUtil.GetTimeZone.

Thanks!

John

Barnaby James

unread,
May 15, 2009, 10:04:32 PM5/15/09
to google-calend...@googlegroups.com
It might be worth setting the machine locale to US / English to see if
that makes a difference.

Barnaby
--
--
Barnaby James

Morgan

unread,
May 16, 2009, 7:54:11 AM5/16/09
to google-calendar-connectors
Thanks for your response John & Barnaby !

I'll try to change the settings on the locale machine.

However, in the inetpub directory, I've the Google Web Service but
there is only dll files. Is it possible to download the full source
code ?

Barnaby James

unread,
May 16, 2009, 11:41:37 AM5/16/09
to google-calend...@googlegroups.com
The sources are in a subversion repository here:
http://code.google.com/p/google-calendar-connectors/source/browse/
There are some details of how to build things here:
http://code.google.com/p/google-calendar-connectors/wiki/HowToBuild
--
--
Barnaby James

Morgan

unread,
May 18, 2009, 3:39:43 AM5/18/09
to google-calendar-connectors
Hello everyone.
Today I generated a new version of the Google Calendar and now I've
the value of the parameters in the GetTimeZone method (OlsonUtil.cs).

In my case, it's "Paris Madrid". I changed my computer parameters and
I have the same error with the parameter "Amerique Centrale".

[3280] INFO Google.GCalExchangeSync.Library.GCalFreeBusyRequest -
Request received from GCal. [body=[1,1,[********@c*********.com],
20090509/20090527,20090518T092041,Europe/Paris]]

[3516] INFO Google.GCalExchangeSync.Library.GCalFreeBusyRequest -
Request received from GCal. [body=[1,0,[morgan...@capgemini.com],
20090509/20090527,20090518T092038,Europe/Paris]]
2009-05-18 09:20:45,938 [3280] ERROR
GCalExchangeLookup.ExchangeQuerier -
System.TypeInitializationException: Une exception a été levée par
l'initialiseur de type pour
'Google.GCalExchangeSync.Library.Util.OlsonUtil'. --->
Google.GCalExchangeSync.Library.GCalExchangeException: Unknown
destintation timezone name (Paris, Madrid)

Thanks for your help !



On 16 mai, 17:41, Barnaby James <baja...@gmail.com> wrote:
> The sources are in a subversion repository here:http://code.google.com/p/google-calendar-connectors/source/browse/
> There are some details of how to build things here:http://code.google.com/p/google-calendar-connectors/wiki/HowToBuild
>

Morgan

unread,
May 18, 2009, 4:21:41 AM5/18/09
to google-calendar-connectors
It's strange ... I checked and Europe/Paris is a valid international
Timezone. And in the request received from Gcal, the timezone is
Europe/Paris.

But in the method, the timezone is "Paris, Madrid" which is not a
valid timezone. If I change the method and force the timezone (var
name = "Europe/Paris"), the request works !

John Leen

unread,
May 18, 2009, 2:43:53 PM5/18/09
to google-calendar-connectors
I've just heard from Zbigniew Babiej, developer of the TZ4Net library.
He suggests the problem may be that we're using an older version of
his library which doesn't support localized timezone names. This
suggests two possible fixes:

1. We may need to update the version of TZ4Net that ships with the Web
Service. If you'd like, you could try dropping in the latest version
and see if it clears up your problem.

2. You may be able to work around the problem by setting your server's
system locale to US English. Obviously this isn't a good long-term
solution! But it would let us be sure where the problem is.

One way or another this sounds like something that'll require a fix in
the Web Service, either by changing the code or updating the TZ4Net
library. Thanks for helping us investigate this. And thanks, Zbigniew,
for the tip!

John

Morgan

unread,
May 18, 2009, 3:30:19 PM5/18/09
to google-calendar-connectors
Thanks John (And Zbigniew !) for your help !

I'll try to update the TZ4Net library.

Morgan

unread,
May 19, 2009, 5:00:26 AM5/19/09
to google-calendar-connectors
I downloaded & Compile the last version of the TZ4Net library but
there is some problems with non exiting method used by the connector's
code.

Si I decided to check the connector's code (With the TZ4Net library
included in the SVN).

In the GCalFreeBusyRequest.cs, in the Parse Method

/* Get the current time zone name */
log.InfoFormat("Before Get Time Zone (Parse Method) :
{0}", requestItems[5].Trim());

timeZone = OlsonUtil.GetTimeZone(requestItems[5].Trim());

log.InfoFormat("After Get Time Zone (Parse Method) : {0}",
timeZone.Name);

The exception is launched is the GetTimeZone method.

In the OlsonUtil.cs, in the GetTimeZoneMethod

public static OlsonTimeZone GetTimeZone(string name)
{
log.InfoFormat("In start of GetTimezoneMethod : {0}",
name);

//name = "Europe/Paris"; // Force the name ...and it
work !

if (OlsonTimeZone.LookupName(name) == null)
{
throw new GCalExchangeException
(GCalExchangeErrorCode.OlsonTZError,
"Unknown destintation timezone name (" +
name + ") Default TZ : " + DefaultTimeZone + " | Standard Name : " +
System.TimeZone.CurrentTimeZone.StandardName);
}

OlsonTimeZone tz = OlsonTimeZone.GetInstance(name);

log.InfoFormat("In End of GetTimezoneMethod (GetInstance
Method : {0}", tz.Name);
return tz;
}

Now, the log result :

Google.GCalExchangeSync.Library.GCalFreeBusyRequest - Request received
from GCal. [body=[1,0,[*******@******],
20090510/20090528,20090519T105156,Europe/Paris]]

Google.GCalExchangeSync.Library.GCalFreeBusyRequest - Before Get Time
Zone (Parse Method) : Europe/Paris

Google.GCalExchangeSync.Library.GCalFreeBusyRequest - In start of
GetTimezoneMethod : Paris, Madrid

On my Windows parameter, I'm using the GMT +01 (Paris, Madrid) but how
the variable Europe/Paris is transformed to Paris, Madrid ?

Thanks a lot !

John Leen

unread,
May 19, 2009, 8:57:46 PM5/19/09
to google-calendar-connectors
Hi Morgan,

Okay, I think I'm beginning to understand the problem here. I'll need
to play with it a little to come up with the best fix, but I have a
workaround that should be good for the time being.

In your original crash stack, the error is coming from the static
constructor for OlsonUtil. As Zbigniew suspects, the offending line is
at the very bottom of OlsonUtil.cs:
OlsonUtil.GetTimeZone
(System.TimeZone.CurrentTimeZone.StandardName);

This is where the "Paris, Madrid" string is coming from. Apparently
different locales of Windows have different names for the timezones.
In other words, the timezone that comes in from the web request is
just fine; it's only the timezone that we're getting in this one line
which is wrong. We need to make a fix either to get a non-localized
timezone here, or use a version of TZ4Net that handles the localized
name.

Thus, you should be able to do a workaround just by hard-coding this
one line. In other words, please change this line to
OlsonUtil.GetTimeZone("Europe/Paris");

and see if that works! This is a smaller change than hard-coding
inside OlsonUtil.GetTimeZone itself. And I'll work on a real fix.

Please let me know if this works as a workaround. Thanks for putting
in so much work to track this down!

John

Morgan

unread,
May 20, 2009, 3:03:00 AM5/20/09
to google-calendar-connectors
Hi John,
Thanks for your response.
During my debug session yesterday, I also found the problem with the
static constructor.

If we change this ligne with "Europe/Paris", the program works ...
But, I have users all over the world ... So if we have the "Europe/
Paris" timezone for all users, it could be a problem, isn't it ?

Thanks !

John Leen

unread,
May 20, 2009, 3:22:23 AM5/20/09
to google-calendar-connectors
Hi Morgan,

The line in question gets the system time zone of the Windows box that
the Web Service is running on. In other words, this line is already
returning the same time zone for all users, even before my suggested
change. (The user's time zone comes from elsewhere.) So if you're
running the service on multiple machines which are configured for
different time zones, you'd need a different hard-coded line for each
machine. But for multiple users on any given machine, the hard-coded
line will be fine. Not a great workaround, I know—we'll try to have a
real solution soon!

Thanks,
John
Reply all
Reply to author
Forward
0 new messages