-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Deprecate or better document Location.tz
#1752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
My first reaction is "a location has a timezone". Maybe the aspiration was to offer a method that found the timezome from the position. I'm lukewarm about removing it. However, a Location doesn't (and won't, I think) have an associated datetime (or index) so I don't think keeping I think at least one person was tripped up as you describe but I can't find the conversation now. |
I've always found it very confusing and have seen people specify it and think it carries over to the I vote deprecating it. |
Line 60 in 89cc1fc
That pattern evolved into the There was some discussion about optionally inferring the time zone using a library like timezone finder, but that didn't have much traction (and I don't support it today). It would not surprise me if a small number of users find the attribute helpful for their own bookkeeping. So I lean towards first improving the documentation and if we're not happy with the results or if too many people are still confused then we can deprecate. |
Location
objects have atz
parameter and corresponding attribute. I think its purpose is confusing; unlike the otherLocation
attributes (latitude
,longitude
,altitude
), which get used in the helper methods,tz
is not used anywhere in theLocation
class. I think it saw more use in the early versions of pvlib, but nowadays it seems to only get used in two places, both external toLocation
:forecast.py
, which may be removed soon (#1735 (comment)), andtools.localize_to_utc
, which itself is not used anywhere.I suspect its existence might trip up people who assume that setting the correct
tz
in theLocation
is the path to getting correct solar positions.I think we should at minimum do a better job of documenting what
tz
is and is not for, but I think I'd support deprecating and eventually removing it altogether.The text was updated successfully, but these errors were encountered: