Fix time calculations - Fixes VANILLA-280