Fixes datetime usage