Skip to content

Commit

Permalink
More docstring tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
markcampanelli committed Jan 28, 2025
1 parent a5f7646 commit 1382e30
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pvlib/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ class Location:
Positive is east of the prime meridian.
Use decimal degrees notation.
tz : time zone as str, int, float, or datetime.tzinfo (inc. subclasses
from the pytz and zoneinfo packages), default 'UTC'.
tz : time zone as str, int, float, or datetime.tzinfo (including
subclassesfrom the pytz and zoneinfo packages), default 'UTC'.
This value is stored as a valid IANA time zone name string. See
http://en.wikipedia.org/wiki/List_of_tz_database_time_zones for a
list of valid name strings, any of which may be passed directly here.
`int`s and `float`s must be whole-number hour offsets from UTC, which
ints and floats must be whole-number hour offsets from UTC, which
are converted to the IANA-suppored 'Etc/GMT-N' format. (Note the
limited range of the offset N and its sign-change convention.)
Expand Down Expand Up @@ -98,6 +98,7 @@ def __repr__(self):

@property
def tz(self):
"""The location's IANA time-zone string."""
return str(self._zoneinfo)

@tz.setter
Expand Down Expand Up @@ -127,6 +128,7 @@ def tz(self, tz_):

@property
def pytz(self):
"""The location's pytz time zone."""
return pytz.timezone(str(self._zoneinfo))

@classmethod
Expand Down

0 comments on commit 1382e30

Please sign in to comment.