Changed time system for periods.

Still, this is subject to further testing.