Reworked DateTime functions.