(1)Pension benefits granted to an officer, or to his dependants, shall be computed-
(a) except in the case of a deferred pension, in accordance with the provisions relating to such officer which are in force at the date of his retirement, or death or injury, as the case may be;
(b) in the case of a deferred pension, in accordance with the provisions which are in force at the date when the officer leaves the service.
(2) Subject to section 21, a separate pension shall be computed and granted in respect of each period of continuous service of an officer in the public service.