Fixed defect that caused errors based on daylight savings time.  Changed implementation of round_to_period.  May need to be optimized.