DateTime to datetime and vice versa corrections