Skip to content

explicit parsing of timestamps for Solcast API changes - #2931

Open
lorenzo-solcast wants to merge 2 commits into
pvlib:mainfrom
lorenzo-solcast:solcast-api-format-v3
Open

lorenzo-solcast wants to merge 2 commits into
pvlib:mainfrom
lorenzo-solcast:solcast-api-format-v3

Conversation

@lorenzo-solcast

@lorenzo-solcast lorenzo-solcast commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor
  • [x ] Closes Upcoming API changes to pvlib.iotools.solcast functions #2928
  • I am familiar with the contributing guidelines
  • I attest that all AI-generated material has been vetted for accuracy and is in compliance with the pvlib license
  • Tests added
  • Updates entries in docs/sphinx/source/reference for API changes.
  • Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

@AdamRJensen AdamRJensen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This look good to me. Thanks @lorenzo-solcast

Comment thread pvlib/iotools/solcast.py Outdated
Comment on lines +416 to +417
If all timestamps share the same UTC offset, that offset is kept;
otherwise the timestamps are converted to UTC.

@AdamRJensen AdamRJensen Nov 15, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lorenzo-solcast Why would the timestamps not always have the same time zone offset?

Edit: I've realized afterward that this might occur when there is daylight saving time.

Could you elaborate on what the convention is in terms of the time zone? Does it always return in local time or?

@lorenzo-solcast lorenzo-solcast Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the review @AdamRJensen . You are right, there is no scenario where this would happen as you either specify the offset in the request or it defaults to utc, so the offset retuned from the request will be consistent across the data. Updated the PR.

@lorenzo-solcast

Copy link
Copy Markdown
Contributor Author

I have introduced a change that will support the "testing" phase, so to allow specifying format=json;version=3 prior to February 2027. This will be equivalent to the default behaviour after that.

@kandersolar kandersolar added this to the v0.16.2 milestone Nov 21, 2026
@kandersolar kandersolar added the io label Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upcoming API changes to pvlib.iotools.solcast functions

3 participants