Improved safety of DateTime API