question: public static GregorianCalendar rawBytesToCalendar ( byte [ ] value , int offset ) { if ( value . length - offset >= 6 ) { GregorianCalendar timestamp = new GregorianCalendar ( value [ offset ] + 2000 , value [ offset + 1 ] , value [ offset + 2 ] , value [ offset + 3 ] , value [ offset + 4 ] , value [ offset + 5 ] ) ; int offsetInHours = MiBandCoordinator . getDeviceTimeOffsetHours ( ) ; if ( offsetInHours != 0 ) timestamp . add ( Calendar . HOUR_OF_DAY , - offsetInHours ) ; return timestamp ; } return createCalendar ( ) ; }
target:  uses the standard algorithm to convert bytes received from the MiBand to a Calendar object