Multipart email with text and calendar: Outlook doesn’t recognize ics

You are missing the iTIP method, both in the content-type: Content-Type: text/calendar; charset=”utf-8″; method=REQUEST and as a VCALENDAR property as well: BEGIN:VCALENDAR VERSION:2.0 METHOD:REQUEST PRODID:-//GourmetPortal//NONSGML rr//DE The method might be PUBLISH or REQUEST (in which case you also miss some ATTENDEE property). Then, some clients are ignoring iMIP in multipart/alternative and are looking only as … Read more

How to tackle daylight savings using TimeZone in Java

This is the problem to start with: Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(“EST”)); The 3-letter abbreviations should be wholeheartedly avoided in favour of TZDB zone IDs. EST is Eastern Standard Time – and Standard time never observes DST; it’s not really a full time zone name. It’s the name used for part of a time zone. (Unfortunately … Read more

How to handle calendar TimeZones using Java?

public static Calendar convertToGmt(Calendar cal) { Date date = cal.getTime(); TimeZone tz = cal.getTimeZone(); log.debug(“input calendar has date [” + date + “]”); //Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT long msFromEpochGmt = date.getTime(); //gives you the current offset in ms from GMT at the current date int offsetFromUTC = tz.getOffset(msFromEpochGmt); … Read more

How to add calendar events in Android?

Try this in your code: Calendar cal = Calendar.getInstance(); Intent intent = new Intent(Intent.ACTION_EDIT); intent.setType(“vnd.android.cursor.item/event”); intent.putExtra(“beginTime”, cal.getTimeInMillis()); intent.putExtra(“allDay”, true); intent.putExtra(“rrule”, “FREQ=YEARLY”); intent.putExtra(“endTime”, cal.getTimeInMillis()+60*60*1000); intent.putExtra(“title”, “A Test Event from android app”); startActivity(intent);