question: public Time ( Date time ) { SimpleTimeZone tz = new SimpleTimeZone ( 0 , "Z" ) ; SimpleDateFormat dateF = new SimpleDateFormat ( "yyyyMMddHHmmss" ) ; dateF . setTimeZone ( tz ) ; String d = dateF . format ( time ) + "Z" ; int year = Integer . parseInt ( d . substring ( 0 , 4 ) ) ; if ( year < 1950 || year > 2049 ) { this . time = new DERGeneralizedTime ( d ) ; } else { this . time = new DERUTCTime ( d . substring ( 2 ) ) ; } }
target:  Creates a time object from a given date - if the date is between 1950 and 2049 a UTCTime object is generated, otherwise a GeneralizedTime is used.