Start and End date same for all day event (Java)

I’m creating all day event from the ical file and I noticed that it’s marked as all day event in the created pst but start date and end date are the same, while in the original end date is day after start date.
Please see attached ical file.
This is how I marked the event as all day :

Appointment app = Appointment.load(new ByteArrayInputStream(outStream.getBuffer(), 0, outStream.size()));
final MailMessage msg = new MailMessage();
msg.addAlternateView(app.requestApointment());
final MapiMessage mapi = MapiMessage.fromMailMessage(msg, options);
final MapiCalendar tmpCal = (MapiCalendar) mapi.toMapiMessageItem();
tmpCal.setAllDay(isAllDay);

Please see screenshots, where green is from the PST and the blue is original
Thanks

image.png (12.4 KB)
image.png (13.0 KB)
allday.ical.zip (1.2 KB)

@slavago,

We have observed the same problem at our end and the same has been forwarded to our Product team for further investigation via issue id: EMAILJAVA-34310. We’ll update you here once there is some information or a fix version available in this regard.

@slavago,

This issue has been fixed in Aspose.Email for Java 17.10 version of the API which is now available for download.

Hi,
Seems that there’s regression in this fix, if DTSTART and DTEND have time part like (as google calendar returns) the all day property is disregarded:

BEGIN:VEVENT
DTSTAMP:20200126T022442Z
UID:0dk34l6qga9apt1f62tmi7a2ni@google.com
SUMMARY:“Test”
SEQUENCE:0
TRANSP:TRANSPARENT
STATUS:CONFIRMED
CREATED:20200125T151311Z
LAST-MODIFIED:20200125T151311Z
DTSTART:20200204T000000
DTEND:20200208T000000
END:VEVENT

@slavago,

Can you please share that which version you have used on your end. Please share all necessary details along with used sample code for reproducing the issue on your end.

All necessary information is in the thread. So, I don’t understand why you ask it, looks like it’s template answer without to try to understand at all. So, at the begging you have cose sample with data sample and in my reply yesterday you have latest data sample.

@slavago,

I’m sorry for your inconvenience. Actually, you have shared the issue as regression. The said issue was marked resolved in Aspose.Email for Java 17.10, which is fairly older version. Therefore, I requested to provide which version reproduces the regression on your end to log a regression ticket accordingly.

Currently we’re using 19.6.2

@slavago,

I have worked with the source .ICS file shared with us earlier (I only modified the start and end date to latest) and have added that to PST. The generated PST has been opened in MS Outlook too and the dates appear to be different. For your kind reference, I have attached all information used on my end. Can you please provide the ICS file that you feel is responsible for regression. I have used following sample code using Aspose.Email for Java 19.12 on my end and suggest you to please try the same version on your end too.

    public static void ReadIcal()
    {
        try
        {
            String path = "C:\\Aspose Data\\";

            Appointment app = Appointment.load(path + "allday.ics");
            MailMessage msg = new MailMessage();
            msg.getAlternateViews().addItem(app.requestApointment());
            MapiMessage mapi = MapiMessage.fromMailMessage(msg, new MapiConversionOptions());
            MapiCalendar tmpCal = (MapiCalendar)mapi.toMapiMessageItem();
            //tmpCal.IsAllDay =(true);
            PersonalStorage pst = PersonalStorage.create(path+"AllDayPst.pst", FileFormatVersion.Unicode);
            FolderInfo fi = pst.createPredefinedFolder("CalAllDay", StandardIpmFolder.Appointments);
            fi.addMapiMessageItem(tmpCal);
            pst.dispose();
            
                 }
        catch(Exception e)
        {
            e.printStackTrace();
        }
    }

Aspose Data.zip (68.2 KB)

Sorry for confusimg you, the issue ia with google calendar all day vents (not all), bjt we found in customer calendar they have all day events that starts on 230000 and ends on 23000p next day, in Google it’s showing as 1 day all day even, when I add this event to pst it creates 2 days all day event.
Thanks

@slavago,

You are always welcome for inquiries. My request to you is to provide me the ICS file with such scenario that I may right away test and add in issue tracking system for resolution. Secondly, you have mentioned that you have used Aspose.Email for Java 19.6.1. Where as for your previous ICS file, I have used latest Aspose.Email for Java 19.12 on my end. Therefore, in my humble suggestion please try the latest version as well. If you are unable to use latest version then please share the source ICS file that I may test using latest version on my end.

Please see attached event.
Also you need to do tmpCal.IsAllDay =(true);
event.zip (948 Bytes)

Thanks

@slavago,

I have worked with the sample file shared by you and have observed following image when opened the generated PST calendar in MS Outlook. An issue with ID EMAILJAVA-34650 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

2DayEvent.png (52.6 KB)