public static String getDisplayedTimezone ( long startMillis , String localTimezone , String eventTimezone ) { String tzDisplay = null ; if ( ! TextUtils . equals ( localTimezone , eventTimezone ) ) { // Figure out if this is in DST TimeZone tz = TimeZone . getTimeZone ( localTimezone ) ; if ( tz == null || tz . getID ( ) . equals ( "GMT" ) ) { tzDisplay = localTimezone ; } else { Time startTime = new Time ( localTimezone ) ; startTime . set ( startMillis ) ; tzDisplay = tz . getDisplayName ( startTime . isDst != 0 , TimeZone . SHORT ) ; } } return tzDisplay ; }
Returns the timezone to display in the event info if the local timezone is different from the event timezone . Otherwise returns null .