Date handling fixes.