@Override
    @Deprecated
    public void getOffsetFromLocal(long date,
            int nonExistingTimeOpt, int duplicatedTimeOpt, int[] offsets) {
        offsets[0] = getRawOffset();
        int fields[] = new int[6];
        Grego.timeToFields(date, fields);
        offsets[1] = getOffset(GregorianCalendar.AD,
              fields[0], fields[1], fields[2],
              fields[3], fields[5]) - offsets[0];

        boolean recalc = false;

        // Now, we need some adjustment
        if (offsets[1] > 0) {
            if ((nonExistingTimeOpt & STD_DST_MASK) == LOCAL_STD
                || (nonExistingTimeOpt & STD_DST_MASK) != LOCAL_DST
                && (nonExistingTimeOpt & FORMER_LATTER_MASK) != LOCAL_LATTER) {
                date -= getDSTSavings();
                recalc = true;
            }
        } else {
            if ((duplicatedTimeOpt & STD_DST_MASK) == LOCAL_DST
                || (duplicatedTimeOpt & STD_DST_MASK) != LOCAL_STD
                && (duplicatedTimeOpt & FORMER_LATTER_MASK) == LOCAL_FORMER) {
                date -= getDSTSavings();
                recalc = true;
            }
        }

        if (recalc) {
            Grego.timeToFields(date, fields);
            offsets[1] = getOffset(GregorianCalendar.AD,
                    fields[0], fields[1], fields[2],
                    fields[3], fields[5]) - offsets[0];
        }
    }
@ Override @ Deprecated public void getOffsetFromLocal ( long date , int nonExistingTimeOpt , int duplicatedTimeOpt , int [ ] offsets ) { offsets [ 0 ] = getRawOffset ( ) ; int fields [ ] = new int [ 6 ] ; Grego . timeToFields ( date , fields ) ; offsets [ 1 ] = getOffset ( GregorianCalendar . AD , fields [ 0 ] , fields [ 1 ] , fields [ 2 ] , fields [ 3 ] , fields [ 5 ] ) - offsets [ 0 ] ; boolean recalc = false ; if ( offsets [ 1 ] > 0 ) { if ( ( nonExistingTimeOpt & STD_DST_MASK ) == LOCAL_STD || ( nonExistingTimeOpt & STD_DST_MASK ) != LOCAL_DST && ( nonExistingTimeOpt & FORMER_LATTER_MASK ) != LOCAL_LATTER ) { date -= getDSTSavings ( ) ; recalc = true ; } } else { if ( ( duplicatedTimeOpt & STD_DST_MASK ) == LOCAL_DST || ( duplicatedTimeOpt & STD_DST_MASK ) != LOCAL_STD && ( duplicatedTimeOpt & FORMER_LATTER_MASK ) == LOCAL_FORMER ) { date -= getDSTSavings ( ) ; recalc = true ; } } if ( recalc ) { Grego . timeToFields ( date , fields ) ; offsets [ 1 ] = getOffset ( GregorianCalendar . AD , fields [ 0 ] , fields [ 1 ] , fields [ 2 ] , fields [ 3 ] , fields [ 5 ] ) - offsets [ 0 ] ; } }
{@inheritDoc}
@deprecated This API is ICU internal only.
@hide draft / provisional / internal are hidden on Android