private int [ ] getTzComponents ( ZonedDateTime d ) { ZoneOffset offset = d . getOffset ( ) ; int secs = offset . getTotalSeconds ( ) ; boolean negative = secs < 0 ; if ( negative ) { secs = - secs ; } int hours = secs / 3600 ; int mins = ( secs % 3600 ) / 60 ; return new int [ ] { negative ? - 1 : 1 , secs , hours , mins } ; }
Decode some fields about a time zone .