public void setLocalTime ( long time ) { // If this is a local time zone date, just set the time if ( _timeZone != _gmtTimeZone ) { calculateSplit ( time ) ; } // If this is a GMT date, convert from local to GMT else { calculateSplit ( time - _localTimeZone . getRawOffset ( ) ) ; try { long offset = _localTimeZone . getOffset ( GregorianCalendar . AD , ( int ) _year , ( int ) _month , ( int ) _dayOfMonth + 1 , getDayOfWeek ( ) , ( int ) _timeOfDay ) ; calculateSplit ( time - offset ) ; } catch ( Exception e ) { log . log ( Level . FINE , e . toString ( ) , e ) ; } } }
Sets the time in milliseconds since the epoch and calculate the internal variables .