The best time to prune is immediately after the flowering display wanes in spring. This time frame varies depending on location. In USDA zone 9, the shrub blooms as early as February, but in the coolest parts of zone 7 farther north, not until April. Pruning may be done earlier, such as late winter to early spring, but you risk cutting away twig tissues that bear flowers.
Trimming branches in summer and into early fall is problematic, even though it may be shaping the shrub. The flower buds form in summer on the growth that sprouted earlier that spring. Cutting off the branch tips too late in summer removes these buds and therefore diminishes the flowering expected the following late winter and early spring.
Pruning in early fall also creates a dilemma. New growth that sprouts in September and October is too immature to survive the onset of the first fall frosts and freezes, leading to lots of dieback.