Remove some magic from DateTime functions