public void setTimeZone ( final TimeZone timezone ) { if ( dates == null ) { throw new UnsupportedOperationException ( "TimeZone is not applicable to current value" ) ; } this . timeZone = timezone ; if ( timezone != null ) { if ( ! Value . DATE_TIME . equals ( getDates ( ) . getType ( ) ) ) { throw new UnsupportedOperationException ( "TimeZone is not applicable to current value" ) ; } dates . setTimeZone ( timezone ) ; getParameters ( ) . remove ( getParameter ( Parameter . TZID ) ) ; final TzId tzId = new TzId ( timezone . getID ( ) ) ; getParameters ( ) . replace ( tzId ) ; } else { // use setUtc() to reset timezone.. setUtc ( false ) ; } }
Sets the timezone associated with this property .