diff --git a/adafruit_matrixportal/network.py b/adafruit_matrixportal/network.py index 2f3aa71..7384f30 100755 --- a/adafruit_matrixportal/network.py +++ b/adafruit_matrixportal/network.py @@ -177,7 +177,8 @@ def get_local_time(self, location=None): "\n\nOur time service requires a login/password to rate-limit. Please register for a free adafruit.io account and place the user/key in your secrets file under 'aio_username' and 'aio_key'" # pylint: disable=line-too-long ) from KeyError - location = secrets.get("timezone", location) + if location is None: + location = secrets.get("timezone") if location: print("Getting time for timezone", location) api_url = (TIME_SERVICE + "&tz=%s") % (aio_username, aio_key, location)