public static java . sql . Time rollTime ( java . util . Date startDate , int period , int amount ) { GregorianCalendar gc = new GregorianCalendar ( ) ; gc . setTime ( startDate ) ; gc . add ( period , amount ) ; return new java . sql . Time ( gc . getTime ( ) . getTime ( ) ) ; }
Roll the java . util . Time forward or backward .