Fix datetime usage.