Hi
Evaluating Aspose.Email for Java 4.3.0, I receive the error;
class com.aspose.email.system.exceptions.ArgumentException: Given TimeZone cannot be understood. Incorrect RawOffset:“12:00:00” or unknown ID:“Pacific/Auckland”
when loading a valid ics file, or even when using your example code to create an appointment.
e.g. this line causes the error
Appointment calDoc = Appointment.load(“c:\test.ics”);
This happens on both Windows 7 & 8.1 PCs.
Using the following lines;
System.out.println(java.util.Locale.getDefault().toString());
System.out.println(TimeZone.getDefault().getID());
System.out.println(TimeZone.getDefault().getRawOffset());
results in;
en_NZ
Pacific/Auckland
43200000
This post seems the same, but I can’t access it Free Support Forum - aspose.com
Can you please advise a fix/workaround? Thanks
Hi Peter,
Thank you for writing to us.
Could you please provide us with a sample file that we can use to reproduce this issue at our end? We’ll look into it and assist you further in this regard.
Thanks Kashif
Please try this one, it generates the error. JRE 1.6.0.
Best regards
Hi Peter,
Thank you for providing the sample file. I was able to reproduce the issue at my end using the latest version of Aspose.Email for Java 4.4.0 and have logged it as NETWRKJAVA-33399 in our bug tracking system. Our development team will further investigate the issue and we’ll update you here once there is some information available in this regard.
Thanks Kashif
Works OK if I change the PC timezone to Fiji, e.g.
en_NZ
Pacific/Fiji
43200000
makes me feel a bit warmer too…
Hi Peter,
Since the issue has already been logged for investigation by development team, we’ll update you here once there is some information available in this regard.
Hi Kashif
Can you please advise progress on this, thanks.
Update:
The same applies using Europe/Paris, e.g. Incorrect RawOffset:“01:00:00” or unknown ID:“Europe/Paris”, however Europe/Berlin, Europe/Prague, Europe/Belgrade etc are OK.
It is also related to the PC timezone, not the timezone specified in the ICS file. For example, if TimeZone.getDefault().getID() returns “Europe/Paris”, loading any ics file will fail, regardless of the timezones specified within it.
So maybe the question is why doesn’t Aspose Email for Java understand some valid timezone IDs?
Incidentally we have bought the product - I’m not sure if this makes a difference to support.
Regards
Hi Peter,
Hi Kashif
This is using Aspose.Email for Java v4.7.0.
Sample ICS file (test.ics);
BEGIN:VCALENDAR
VERSION:1.0
BEGIN:VTIMEZONE
TZID:America/New_York
LAST-MODIFIED:19870101T000000Z
BEGIN:STANDARD
DTSTART:19971026T020000
RDATE:19971026T020000
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:19971026T020000
RDATE:19970406T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTART;TZID=America/New_York:20120328T073000
DTEND;TZID=America/New_York:20120328T093000
SUMMARY:Test Appt Summary
LOCATION:Test Appt Loc
DESCRIPTION:Test Appt Desc
PRIORITY:3
END:VEVENT
END:VCALENDAR
Sample code;
String defTZ = TimeZone.getDefault().getID();
System.out.println("Default TZ " + defTZ);
String useTZ = “Europe/Paris”;
System.out.println("Using TZ " + useTZ);
TimeZone.setDefault(TimeZone.getTimeZone(useTZ));
String testPathStr = “c:\temp\test.ics”;
Appointment calDoc = Appointment.load(testPathStr);
System.out.println("Description = " + calDoc.getDescription());
System.out.println("Reset TZ to " + defTZ);
TimeZone.setDefault(TimeZone.getTimeZone(defTZ));
This fails with the error above.
1. If I change the timezone to say Europe/Berlin, it loads OK.
2. If I remove the Timezone info from the ICS file, it loadS OK.
The affected Timezones seem to be;
Africa/Cairo
America/Anchorage
America/Argentina/Buenos_Aires
Europe/Paris
Pacific/Apia
Pacific/Auckland
Australia/Darwin
Australia/Sydney
Regards
Hi Peter,
Hi Kashif
Is there a fix yet?
Thanks
Hi Peter,
The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan