Skip to content

Commit 479afd4

Browse files
committed
Update argument name from tz to timezone
1 parent 2ebf075 commit 479afd4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

adafruit_io/adafruit_io.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -842,17 +842,17 @@ def receive_random_data(self, generator_id: int):
842842
path = self._compose_path("integrations/words/{0}".format(generator_id))
843843
return self._get(path)
844844

845-
def receive_time(self, tz: str = None):
845+
def receive_time(self, timezone: str = None):
846846
"""
847847
Returns a struct_time from the Adafruit IO Server based on the device's IP address.
848848
https://circuitpython.readthedocs.io/en/latest/shared-bindings/time/__init__.html#time.struct_time
849849
850-
:param str tz: Timezone to return the time in, see https://io.adafruit.com/services/time
850+
:param str timezone: Timezone to return the time in, see https://io.adafruit.com/services/time
851851
default is based on the device's IP address being geolocated, falling back to UTC.
852852
"""
853853
path = self._compose_path("integrations/time/struct.json")
854-
if tz is not None:
855-
path += "?tz={0}".format(tz)
854+
if timezone is not None:
855+
path += "?tz={0}".format(timezone)
856856
time_struct = self._get(path)
857857
return time.struct_time(
858858
(

examples/adafruit_io_http/adafruit_io_groups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106

107107
# fetch current time
108108
print("Fetching current time from IO... ", end="")
109-
year, month, day, hour, minute, second, *_ = io.receive_time(tz="UTC")
109+
year, month, day, hour, minute, second, *_ = io.receive_time(timezone="UTC")
110110
old_time = datetime.datetime(year, month, day, hour, minute, second)
111111
print(old_time.isoformat())
112112

0 commit comments

Comments
 (0)