We study the time-consistent investment and contribution policies in a defined benefit stochastic pension fund where the manager discounts the instantaneous utility over a finite planning horizon and the final function at constant but different instantaneous rates of time preference. This difference, which can be motivated for some uncertainties affecting payoffs at the end of the planning horizon, will induce a variable bias between the relative valuation of the final function and the previous payoffs and will lead the manager to show time-inconsistent preferences. Both the benefits and the contribution rate are proportional to the total wage of the workers that we suppose is stochastic. The aim is to maximize a CRRA utility function of the net benefit relative to salary in a bounded horizon and to maximize a CRRA final utility of the fund level relative to the salary. The problem is solved by means of dynamic programming techniques, and main results are illustrated numerically.