python - Weird behavior on when replacing timezone using pytz timezones vs timezone strings -
i expect replacing tzinfo using 'us/central', give same result using timezone object ( pytz.timezone('us/central') ), apparently it's not: in [5]: import arrow in [6]: d = arrow.get() in [7]: cst = pytz.timezone('us/central') in [8]: d.replace(tzinfo=cst) out[8]: <arrow [2015-07-22t17:40:30.947579-06:00]> in [9]: d.replace(tzinfo='us/central') out[9]: <arrow [2015-07-22t17:40:30.947579-05:00]> note how output of line 8 has different utc offset output of line 9. which way correct way of replacing timezone using arrow , pytz? this seems bug. guessing seeing issue 154 - .to() incompatible pytz.timezone you may seeing same thing .replace() method. issue still open. i use arrow one, seems arrow , pytz not compatible.