Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9228993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:27:49+00:00 2026-06-18T05:27:49+00:00

I am trying to get iCal4j to parse an exported Google .ics calendar file.

  • 0

I am trying to get iCal4j to parse an exported Google .ics calendar file. Unfortunately the parser chokes on a particular value (00001231T000000Z) and throws an exception. My question is how can I get the parser to continue despite the bad data? I am about to edit the source code but is there not a way to configure it to not fail on a date parse error.

I am using ical4j-1.0.5-SNAPSHOT – which I believe is based on the latest code.

My data contains the following event (which appears to be a recurring one):

BEGIN:VEVENT
DTSTART;TZID=America/Vancouver:20101206T060000
DTEND;TZID=America/Vancouver:20101206T150000
RRULE:FREQ=DAILY;UNTIL=20101210T140000Z
DTSTAMP:20121231T143813Z
UID:[deleted]@google.com
CREATED:00001231T000000Z
DESCRIPTION:
LAST-MODIFIED:20110102T020817Z
LOCATION:
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:iCal4j chokes on this
TRANSP:OPAQUE
END:VEVENT

and dies when it tries to parse this date value (which seems to be a nonsense/bad value)

CREATED:00001231T000000Z

I don’t particularly care if the created field is set or is set to a dummy value. What I care about is the parser continuing and not choking on bad data.

I have tried setting the parsing to relaxed, but somehow this case seems to slip through.

        CompatibilityHints.setHintEnabled(
            CompatibilityHints.KEY_RELAXED_PARSING, true);

So, how can I make this code more robust to parse errors? Can I supply my own parser? Can I get it to skip records that have errors?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T05:27:50+00:00Added an answer on June 18, 2026 at 5:27 am

    This is actually a regression. Relaxed parsing should have covered this case. Just fixed it in both branch and tip (http://ical4j.hg.sourceforge.net/hgweb/ical4j/ical4j/rev/8c23205afac9).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to parse an icalendar file (.ics) using ical4j library, and its
I am trying get Javascript popup calendar control to work which doesnt work. I
I'm trying get value of var by its name: var1='Hello' var2 = getTextFromFirstTextBox() //text
I'm trying get my site to error out if the file uploaded ins't a
I am trying get date of call but it's returning value of 1.1.1970(I think
I'm trying get to know decorators, and I have a problem with sharing value,
in my app i am trying to get an xml file from an URL.
I am trying get the following to valid to dd-MMM-yyyy. The calendar extender passes
So i am trying get 2 div-containers which both should contain centered text (Both
I'm trying get the visible portion of UIImage from an UIImageView . UIImageView takes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.