HoT effects will "snapshot" buffs at the time of application. For example if you have 3 seconds left on Temperance or Neutral Sect and use Medica II, Regen or Asp Helios, the 20% potency will apply to the entire HoT duration. For the same reason, if you cast Medica II and then use Temperance, the HoT won't be buffed at all since the potency increase wasn't active at the time of application.

Be aware some abilities buff Magic Potency. This only applies to actions classified as Spells (actions which usually trigger the global cooldown) and not to oGCD's which are classified as Abilities. There are also abilities that "increase HP recovery via healing actions", these don't increase your own heal potency, but instead increase the amount of healing affected players receive from any Spell or Ability.

DoT's also snapshot damage buffs. If you apply a 30 second DoT it will look at any buffs you have active and the entire 30s duration will be buffed.

Similarly enemy DoT effects such as Bleed or Poison snapshot any damage mitigation abilities on application. If you want to mitigate an enemy ability that applies a Bleed DoT, your damage reduction ability needs to be active before the Bleed hits.

Star and Horoscope are interesting examples. These will snapshot buffs when they detonate (either by being manually triggered or the timer expiring) and not when you first press the button.