Optimization DateTime class