calendar working except crossing midnight