Skip to content

Deprecate or better document Location.tz #1752

Open
@kandersolar

Description

@kandersolar

Location objects have a tz parameter and corresponding attribute. I think its purpose is confusing; unlike the other Location attributes (latitude, longitude, altitude), which get used in the helper methods, tz is not used anywhere in the Location 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 to Location: forecast.py, which may be removed soon (#1735 (comment)), and tools.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 the Location 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions