Figure.solar: Support terminator datetime with timezone#4112
Merged
Conversation
27 tasks
Contributor
Summary of changed imagesThis is an auto-generated report of images that have changed on the DVC remote
Image diff(s)Report last updated at commit 813c952 |
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
yvonnefroehlich
approved these changes
Sep 23, 2025
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The
solarmodule can accept datetime with a timezone offset with a syntax like-Td+d2010-01-01T00:00:00+z08:00, but currentlyFigure.solardoesn't support it.This PR adds the support for timezone.
Internally, GMT's solar module uses the C
atoifunction to parse the timezone after +z, so "08:00" -> 8, "-05:00"->-5, and fractional offsets are cast to integers, e.g. "08:30"->8, "-05:30"->-5.Preview: https://pygmt-dev--4112.org.readthedocs.build/en/4112/api/generated/pygmt.Figure.solar.html
Address #4110.