BUG/TST: Add more timezone fixtures and use is_utc more consistently by mroeschke · Pull Request #23807 · pandas-dev/pandas (original) (raw)
- tests added / passed
- passes
git diff upstream/master -u -- "*.py" | flake8 --diff
- whatsnew entry
Was discussed a while back with @jreback to add more timezones to the tz_aware_fixture
, added some less tested ones like:
dateutil.tz.tzlocal
pytz.FixedOffset
This uncovered some bugs with tzlocal
especially near DST transitions.
Additionally, using is_utc
more consistently for UTC checking across the codebase and no longer passing the string 'UTC'
around. Instead the UTC timezone object (i.e. pytz.UTC
or dateutil.tz.tzutc()
) is passed along. However, for single value conversion to/from UTC, pytz.UTC
is used by default.