partial commit, with huge bug on picking the first or last possible datetime