Time zone error

I was trying to set up a server. When I ran this command on the API:

curl -X GET “http://x.x.x.x:5000/v1/models” -H “accept: application/json”

I got a 500 error. The log says

[2021-03-11 14:43:04] mod_wsgi (pid=39035): Exception occurred processing WSGI script ‘/opt/nvidia/medical/nvmidl/apps/aas/www/api_v1.wsgi’.
[2021-03-11 14:43:04] Traceback (most recent call last):
[2021-03-11 14:43:04] File “/usr/local/lib/python3.6/dist-packages/flask_monitoringdashboard/core/config/init.py”, line 49, in init
[2021-03-11 14:43:04] self.timezone = pytz.timezone(str(get_localzone()))
[2021-03-11 14:43:04] File “/usr/local/lib/python3.6/dist-packages/pytz/init.py”, line 181, in timezone
[2021-03-11 14:43:04] raise UnknownTimeZoneError(zone)
[2021-03-11 14:43:04] pytz.exceptions.UnknownTimeZoneError: ‘local’

I stopped the server, added

export TZ=“America/New_York”

restarted it, and that seemed to clear the error.

Thank you for posting the issue and the solution here.

This should be solved in next release.