datetime: clean-ups and new API adjustments