Whenever any public agency having a retirement system takes over and assumes any or all of the functions of any other public agency and because of such assumption all or any of the employees of the second public agency become employees of the first public agency, and no contract is entered into pursuant to Section 31205, the governing body of the first public agency, by resolution, may determine that such employees shall have credit for time employed by the second public agency as provided in this chapter.