Using Joda time for partition and correcting alignment