Skip to content

Commit

Permalink
fix: default timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Dec 15, 2023
1 parent 37f92ad commit 1020301
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cgi-bin/request/gis/lsr.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def get_time_domain(form):
raise IncompleteWebRequest("GET start time parameters missing")
if isinstance(form["ets"], str) and form["ets"] == "":
form["ets"] = utc()

return form["sts"], form["ets"]


Expand Down Expand Up @@ -101,7 +100,7 @@ def do_excel_kml(fmt, sts, ets, wfolimiter, statelimiter):
return fp.getvalue()


@iemapp()
@iemapp(default_tz="UTC")
def application(environ, start_response):
"""Go Main Go"""
if environ["REQUEST_METHOD"] == "OPTIONS":
Expand Down Expand Up @@ -171,6 +170,7 @@ def application(environ, start_response):

if cursor.rowcount == 0:
start_response("200 OK", [("Content-type", "text/plain")])
pgconn.close()
return [b"No results found for query."]

shpio = BytesIO()
Expand Down Expand Up @@ -224,6 +224,7 @@ def application(environ, start_response):
("Content-Disposition", f"attachment; filename={fn}.csv"),
]
start_response("200 OK", headers)
pgconn.close()
return [csv.getvalue().encode("ascii", "ignore")]

zio = BytesIO()
Expand All @@ -241,4 +242,5 @@ def application(environ, start_response):
("Content-Disposition", f"attachment; filename={fn}.zip"),
]
start_response("200 OK", headers)
pgconn.close()
return [zio.getvalue()]

0 comments on commit 1020301

Please sign in to comment.