fix generate_range function in datetimes.py file
change some issues be metioned at #35342

- [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

![testresult_20200720172043.png](https://i.loli.net/2020/07/20/52RGWSEsKng9uav.png)
I test all the cases on my machine but there still have some errors like `pytz.exceptions.NonExistentTimeError: 1907-01-01 00:00:00`
I want to know whether should I change NonExistentTimeError detect ways. > This would need a test.
> 
> Also I don't think this is an appropriate place for the fix. I imagine the bug is in `generate_range`
> 
> Could you give this PR a more informative title as well? Thanks.

I have make some tests and they all passed,I will let PR have  a more informative title。
![image](https://user-images.githubusercontent.com/9131265/88256438-e9cc0980-cced-11ea-8c70-31860229dbd7.png)

 This PR still needs a test. @zky001 can you address https://github.com/pandas-dev/pandas/pull/35348#issuecomment-663341641 and https://github.com/pandas-dev/pandas/pull/35348#pullrequestreview-454628733 See my comment in #35342 on the appropriate fix Closing as stale, @zky001 let us know if you'd still like to work on this