Fix timezone issues in recurring calculation

Begin writing unit tests

Change-Id: I8496d5694e2bb4bfa5100508df39aff3e28184cc