If you have a spell whose duration is based on an ability.. the duration does not increase when the spell effect is applied.
Example: Barbarian's Guarded Stance is based on CON
Barbarian with a base +3 Con Bonus.
Barbarian Rages.. Con Bonus Increases by +2 with the Effect.. CON: 4
Barbarian Activates Guarded Stance.. Duration is 3 rounds. (should be 5 due to the Rage Con Bonus)