Skip to content

Conversation

seisman
Copy link
Member

@seisman seisman commented Sep 21, 2025

The solar module can accept datetime with a timezone offset with a syntax like -Td+d2010-01-01T00:00:00+z08:00, but currently Figure.solar doesn't support it.

This PR adds the support for timezone.

Internally, GMT's solar module uses the C atoi function 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.

@seisman seisman added this to the 0.17.0 milestone Sep 21, 2025
@seisman seisman added enhancement Improving an existing feature needs review This PR has higher priority and needs review. labels Sep 21, 2025
@GenericMappingTools GenericMappingTools deleted a comment from github-actions bot Sep 21, 2025
Copy link
Contributor

github-actions bot commented Sep 21, 2025

Summary of changed images

This is an auto-generated report of images that have changed on the DVC remote

Status Path
added pygmt/tests/baseline/test_solar_terminator_datetime_timezone.png

Image diff(s)

Added images

  • test_solar_terminator_datetime_timezone.png

Modified images

Path Old New

Report last updated at commit 813c952

@seisman seisman changed the title Figure.solar: Support datetime with timezone Figure.solar: Support terminator datetime with timezone Sep 22, 2025
seisman and others added 2 commits September 23, 2025 19:08
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
seisman and others added 4 commits September 23, 2025 20:20
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
seisman and others added 2 commits September 24, 2025 02:18
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
@seisman seisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving an existing feature final review call This PR requires final review and approval from a second reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants