Q:

Why is Timezone offset added to Time undesirably (03:00 to 08:00)

In Android application I am adding events to user's calendar.
My problem is that, the time I save is changed, when it is stored in Google calendar (means 03:00 to 08:00 offset of +0500 added to time which is my time-zone +0500)
Kindly guide me what I am doing wrong.. 
I am using this code to set time and date for calendar Event
calendar.set(year, monthOfYear, dayOfMonth);

calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);
calendar.set(Calendar.MINUTE, minute);
calendar.setTimeZone(TimeZone.getTimeZone("UTC"));

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
DateTime startDateTime = new DateTime(sdf.format(calendar.getTime()));
EventDateTime start = new EventDateTime().setDateTime(startDateTime);

event.setStart(start);

Detail Reference to original code: 
https://developers.google.com/google-apps/calendar/create-events

A:

The problem is likely related to your SimpleDateFormat and can be simplified as:
calendar.set(year, monthOfYear, dayOfMonth);

calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);
calendar.set(Calendar.MINUTE, minute);
calendar.setTimeZone(TimeZone.getTimeZone("UTC"));

DateTime startDateTime = new DateTime(calendar.getTime())
EventDateTime start = new EventDateTime().setDateTime(startDateTime);

event.setStart(start);

The Calendar exposes the underlying Date and the DateTime has a constructor that takes Date so there should be no need to parse it.

