Issue with the timezone preserving while invoking the shift method.
- Dominant language
- Python
- Stars
- 9.1k
- Forks
- 784
- PR merge metrics
- No merged PRs in 30d
Description
## Issue Description
Creating the same error, and converting it to Los Angeles time, and then shifting it with 0 seconds decreases the timezone offset with one, I think there is a problem with the daylight savings calculations.
```python
import sys
import arrow
print(sys.version) # 3.8.9
print(arrow.__version__) # 1.2.1
print(arrow.get("2021-11-07T01:51:23-08:00").to("America/Los_Angeles").shift(seconds=0)) # -> 2021-11-07T01:51:23-07:00
print(arrow.get("2021-11-07T01:51:23-08:00").to("America/Los_Angeles")) # -> 2021-11-07T01:51:23-08:00
```
The desired outcome should be the same for the two invocations in there.
## System Info
- 🖥 **OS name and version**: Mac OS Big Sur Version 11.6
- 🐍 **Python version**: 3.8.9
- 🏹 **Arrow version**: 1.2.1
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the provided Python reproduction with Arrow 1.2.1 and compare the results of to("America/Los_Angeles") and shift(seconds=0) around the daylight-saving transition. Trace the shift and timezone-conversion paths, then confirm that both invocations preserve the -08:00 offset and produce identical output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100