Move normalizeTime utility function to Periods