Within periodic boundary conditions, the traditional quantum mechanical position operator is ill-defined, necessitating the use of alternative methods, most commonly the Berry phase formulation in the modern theory of polarization. Since any information about local properties is lost in this change of framework, the Berry phase formulation can only determine the total electric polarization of a system. Previous approaches toward recovering local electric dipole moments have been based on applying the conventional dipole moment operator to the centers of maximally localized Wannier functions (MLWFs). Recently, another approach to local electric dipole moments has been demonstrated in the field of subsystem density functional theory (DFT) embedding. We demonstrate in this work that this approach, aside from its use in ground state DFT-based molecular dynamics, can also be applied to obtain electric dipole moments during real-time propagated time-dependent DFT (RT-TDDFT). Moreover, we present an analogous approach to obtain local electric dipole moments from MLWFs, which enables subsystem analysis in cases where DFT embedding is not applicable. The techniques were implemented in the quantum chemistry software CP2K for the mixed Gaussian and plane wave method and applied to cis-diimide and water in the gas phase, cis-diimide in aqueous solution, and a liquid mixture of dimethyl carbonate and ethylene carbonate to obtain absorption and infrared spectra decomposed into localized subsystem contributions.