arrow-py / arrow-py/arrow

Strange Timezone offset

Open
#1,207 7 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
9.1k
Forks
784
PR merge metrics
No merged PRs in 30d

Description

## Issue Description
> In [28]:divmod((Arrow.utcnow() - Arrow.now()).days, 1)[0]
< Out[28]:-1

> $ echo TZ
< America/Los_Angeles

- 🐍 **Python version**:

3.11
-
- 🏹 **Arrow version**:
In [3]: arrow.__version__
Out[3]: '1.3.0'

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the discrepancy with Python 3.11, Arrow 1.3.0, TZ=America/Los_Angeles, and the Arrow.utcnow() and Arrow.now() expressions shown. Start by tracing the timezone and date-difference handling around those entry points; done means the reported offset behavior is explained and the unexpected result is corrected with a regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.