Fixes AttributeError when using an older version of DateTime.