fixed deprecated notice for datetime object