some fixes to date and time