Fixing issue with datetime object on older systems