Skip to content

fix: preserve negative timezone offsets when cloning gpx#292

Open
SAY-5 wants to merge 1 commit into
tkrajina:devfrom
SAY-5:fix/clone-negative-timezone
Open

fix: preserve negative timezone offsets when cloning gpx#292
SAY-5 wants to merge 1 commit into
tkrajina:devfrom
SAY-5:fix/clone-negative-timezone

Conversation

@SAY-5

@SAY-5 SAY-5 commented May 23, 2026

Copy link
Copy Markdown

Fixes #190. SimpleTZ.deepcopy rebuilt the tzinfo from tzname(), but tzname() emitted a malformed string for negative offsets (e.g. '-6:00') that SimpleTZ.init parsed back to a zero offset, so clone() silently dropped non-UTC timezones. This zero-pads the hour and adds the sign so tzname() round-trips, with a regression test.

Signed-off-by: SAY-5 <say.apm35@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

timezone lost in <time> fields when cloning/copying parsed GPX file

1 participant