Hello Mikael,

Working with Ryan, I have been able to find a fix for your problem.  Fortunately, it is an issue in the Java client library for GData, so something that you can patch into your local copy of the library yourself to work around the issue.    Thank you for taking the time to narrow down the problem, which helped us *immensely* in figuring out the right fix.

The fix:

You simply need to change com/google/gdata/data/DateTime.java, line 137 from:

      new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z");

to:

      new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", java.util.Locale.ENGLISH);


The gory details:

The GData Java client library is using the above date formatter to generate the value of the If-Modified-Since HTTP header.   This header is required to be in RFC 822 date format ( http://www.ietf.org/rfc/rfc0822.txt, sec 5.1).   For some locales,  the "EEE" component of the format might not result in a value that conforms to the requirements of RFC822.  For example, in the GERMAN locale, this results in a "day" value of "Fr" for Friday, whereas RFC822 requires "Fri".

Always using the ENGLISH locale when generating RFC822 dates will guarantee that the day value conforms to RFC822.    Since all other format values are numeric and not locale-specific, there should be no other side effects of this change.

Hope this helps!

-- Kyle

On 11/10/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:

Ryan,

Good news. I've found the problem. If I switch to an English locale
everything works OK. As soon as I switch to the Swedish locale it fails
as described.

Add this line first and it will fail for you as well.

Locale.setDefault(Locale.GERMAN);

It should be easy to fix now. :)

Cheers,
Mikael

On Nov 9, 11:37 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hi Ryan,
>
> Nope, sorry. That doesn't change anything.
>
> I have sent you the password so you can try my feed.
>
> Cheers,
> Mikael
>
> On Nov 9, 11:25 pm, "Ryan Boyd (Google)" < [EMAIL PROTECTED]> wrote:
>
> > Hi Mikael,
>
> > > URL("http://www.google.com/calendar/feeds/[EMAIL PROTECTED]/private/full "),The code you provided should work, but could you try replacing
> > '...@miginfocom.com' with 'default' to see if that resolves the issue?
>
> > Thanks,
>
> > -Ryan



--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Google Calendar Data API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to