Skip to content

Time zone not changing when passing datetime to solar function #4695

@willschlitzer

Description

@willschlitzer

Using the +z modifier, I'm attempting to change the time zone for the -T parameter for solar. However, changing the time zone does not result in a different display of the day/night terminator as would be expected. This is an error I found when attempting to wrap the function in PyGMT, and @joa-quim asked me to open an issue at this forum post.

Full script that generated the error

The scripts that I'm passing will be with my PyGMT wrapped version of solar, but I believe it will adequately demonstrate the issue. Using identical Figure.coast commands, these different solar plots result in identical figures.

fig.solar(Td="+d1990-02-24T10:57:00+z0", fill="navyblue@80")

fig.solar(Td="+d1990-02-24T10:57:00+z10", fill="navyblue@80")

fig.solar(Td="+d2021-01-24T10:57:00+z-8", fill="navyblue@80")

Actual outcome

Screenshot from 2021-01-24 11-00-50

Expected outcome

The plots to have different day/night terminators.

System information

  • Operating system: Ubuntu 20.04
  • GMT version (gmt --version): 6.1.1
  • PyGMT version: 0.2.2.dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions