We are adding event with start time and end time like below snippet,
EventDateTime startEventDateTime = new EventDateTime().setDateTime(startDateTime).setTimeZone(timeZone);
EventDateTime endEventDateTime = new EventDateTime().setDateTime(endDateTime).setTimeZone(timeZone);
If the timeZone is either "Asia/Calcutta"
or "GMT +05:30"
, it will be added in Google Calendar successfully, but some of our users' timezone is like "IST","PST","CST"
. If we give it in timeZone variable, Google Calendar throws
"Invalid time zone definition for start time."
Is it possible to accept even if the timezone is like "IST","PST","CST","EST"
?
For compatibility with JDK 1.1.x, some other three-letter time zone IDs (such as "PST", "CTT", "AST") are also supported. However, their use is deprecated because the same abbreviation is often used for multiple time zones (for example, "CST" could be U.S. "Central Standard Time" and "China Standard Time"), and the Java platform can then only recognize one of them. So just because of this Google might not accept the Three-letter time zone IDs.