prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  the report cant show the right time
  <!-- 
  If you have a general question about how to use Locust, please check Stack Overflow first https://stackoverflow.com/questions/tagged/locust
  
  You can also ask new questions on SO, https://stackoverflow.com/questions/ask just remember to tag your question with "locust". Do not immediately post your issue here after posting to SO, wait for an answer there instead.
  
  Use this form only for reporting actual bugs in Locust. Remember, the developers of Locust are unpaid volunteers, so make sure you have tried everything you can think of before filing a bug :) 
  
  Always make sure you are running an up to date Locust version (pip3 install -U locust)
  -->
  
  ### Describe the bug
  <!-- A clear and concise description of what the bug is -->
  ![image](https://user-images.githubusercontent.com/47803360/138236838-6d62d47c-aa4d-4de7-b714-d94b7dff639a.png)
  ![image](https://user-images.githubusercontent.com/47803360/138236861-d318f852-da06-41e9-abcb-fa18d47166c7.png)
  this picture is right time  i am in china
  
  
  ### Expected behavior
  <!-- Tell us what you think should happen -->
  Wrong time zone reported
  ### Actual behavior
  <!-- Tell us what happens instead. Include screenshots if this an issue with the GUI. -->
  
  ### Steps to reproduce
  <!-- Please provide a minimal reproducible code example (https://stackoverflow.com/help/minimal-reproducible-example) --> 
  
  ### Environment
  
  - OS:
  - Python version:
  - Locust version: (please dont file issues for anything but the most recent release or prerelease builds)
  - Locust command line that you ran:
  - Locust file contents (anonymized if necessary):
  
  </issue>
  <code>
  [start of locust/html.py]
  1 from jinja2 import Environment, FileSystemLoader
  2 import os
  3 import pathlib
  4 import datetime
  5 from itertools import chain
  6 from .stats import sort_stats
  7 from .user.inspectuser import get_task_ratio_dict
  8 from html import escape
  9 from json import dumps
  10 
  11 
  12 def render_template(file, **kwargs):
  13     templates_path = os.path.join(pathlib.Path(__file__).parent.absolute(), "templates")
  14     env = Environment(loader=FileSystemLoader(templates_path), extensions=["jinja2.ext.do"])
  15     template = env.get_template(file)
  16     return template.render(**kwargs)
  17 
  18 
  19 def get_html_report(environment, show_download_link=True):
  20     stats = environment.runner.stats
  21 
  22     start_ts = stats.start_time
  23     start_time = datetime.datetime.fromtimestamp(start_ts).strftime("%Y-%m-%d %H:%M:%S")
  24 
  25     end_ts = stats.last_request_timestamp
  26     if end_ts:
  27         end_time = datetime.datetime.fromtimestamp(end_ts).strftime("%Y-%m-%d %H:%M:%S")
  28     else:
  29         end_time = start_time
  30 
  31     host = None
  32     if environment.host:
  33         host = environment.host
  34     elif environment.runner.user_classes:
  35         all_hosts = set([l.host for l in environment.runner.user_classes])
  36         if len(all_hosts) == 1:
  37             host = list(all_hosts)[0]
  38 
  39     requests_statistics = list(chain(sort_stats(stats.entries), [stats.total]))
  40     failures_statistics = sort_stats(stats.errors)
  41     exceptions_statistics = [
  42         {**exc, "nodes": ", ".join(exc["nodes"])} for exc in environment.runner.exceptions.values()
  43     ]
  44 
  45     history = stats.history
  46 
  47     static_js = []
  48     js_files = ["jquery-1.11.3.min.js", "echarts.common.min.js", "vintage.js", "chart.js", "tasks.js"]
  49     for js_file in js_files:
  50         path = os.path.join(os.path.dirname(__file__), "static", js_file)
  51         static_js.append("// " + js_file)
  52         with open(path, encoding="utf8") as f:
  53             static_js.append(f.read())
  54         static_js.extend(["", ""])
  55 
  56     static_css = []
  57     css_files = ["tables.css"]
  58     for css_file in css_files:
  59         path = os.path.join(os.path.dirname(__file__), "static", "css", css_file)
  60         static_css.append("/* " + css_file + " */")
  61         with open(path, encoding="utf8") as f:
  62             static_css.append(f.read())
  63         static_css.extend(["", ""])
  64 
  65     task_data = {
  66         "per_class": get_task_ratio_dict(environment.user_classes),
  67         "total": get_task_ratio_dict(environment.user_classes, total=True),
  68     }
  69 
  70     res = render_template(
  71         "report.html",
  72         int=int,
  73         round=round,
  74         requests_statistics=requests_statistics,
  75         failures_statistics=failures_statistics,
  76         exceptions_statistics=exceptions_statistics,
  77         start_time=start_time,
  78         end_time=end_time,
  79         host=host,
  80         history=history,
  81         static_js="\n".join(static_js),
  82         static_css="\n".join(static_css),
  83         show_download_link=show_download_link,
  84         locustfile=environment.locustfile,
  85         tasks=escape(dumps(task_data)),
  86     )
  87 
  88     return res
  89
  [end of locust/html.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/locust/html.py b/locust/html.py
  --- a/locust/html.py
  +++ b/locust/html.py
  @@ -20,11 +20,11 @@
       stats = environment.runner.stats
   
       start_ts = stats.start_time
  -    start_time = datetime.datetime.fromtimestamp(start_ts).strftime("%Y-%m-%d %H:%M:%S")
  +    start_time = datetime.datetime.utcfromtimestamp(start_ts).strftime("%Y-%m-%d %H:%M:%S")
   
       end_ts = stats.last_request_timestamp
       if end_ts:
  -        end_time = datetime.datetime.fromtimestamp(end_ts).strftime("%Y-%m-%d %H:%M:%S")
  +        end_time = datetime.datetime.utcfromtimestamp(end_ts).strftime("%Y-%m-%d %H:%M:%S")
       else:
           end_time = start_time
  
verification_info: {"golden_diff": "diff --git a/locust/html.py b/locust/html.py\n--- a/locust/html.py\n+++ b/locust/html.py\n@@ -20,11 +20,11 @@\n     stats = environment.runner.stats\n \n     start_ts = stats.start_time\n-    start_time = datetime.datetime.fromtimestamp(start_ts).strftime(\"%Y-%m-%d %H:%M:%S\")\n+    start_time = datetime.datetime.utcfromtimestamp(start_ts).strftime(\"%Y-%m-%d %H:%M:%S\")\n \n     end_ts = stats.last_request_timestamp\n     if end_ts:\n-        end_time = datetime.datetime.fromtimestamp(end_ts).strftime(\"%Y-%m-%d %H:%M:%S\")\n+        end_time = datetime.datetime.utcfromtimestamp(end_ts).strftime(\"%Y-%m-%d %H:%M:%S\")\n     else:\n         end_time = start_time\n", "issue": "the report cant show the right time\n<!-- \r\nIf you have a general question about how to use Locust, please check Stack Overflow first https://stackoverflow.com/questions/tagged/locust\r\n\r\nYou can also ask new questions on SO, https://stackoverflow.com/questions/ask just remember to tag your question with \"locust\". Do not immediately post your issue here after posting to SO, wait for an answer there instead.\r\n\r\nUse this form only for reporting actual bugs in Locust. Remember, the developers of Locust are unpaid volunteers, so make sure you have tried everything you can think of before filing a bug :) \r\n\r\nAlways make sure you are running an up to date Locust version (pip3 install -U locust)\r\n-->\r\n\r\n### Describe the bug\r\n<!-- A clear and concise description of what the bug is -->\r\n![image](https://user-images.githubusercontent.com/47803360/138236838-6d62d47c-aa4d-4de7-b714-d94b7dff639a.png)\r\n![image](https://user-images.githubusercontent.com/47803360/138236861-d318f852-da06-41e9-abcb-fa18d47166c7.png)\r\nthis picture is right time  i am in china\r\n\r\n\r\n### Expected behavior\r\n<!-- Tell us what you think should happen -->\r\nWrong time zone reported\r\n### Actual behavior\r\n<!-- Tell us what happens instead. Include screenshots if this an issue with the GUI. -->\r\n\r\n### Steps to reproduce\r\n<!-- Please provide a minimal reproducible code example (https://stackoverflow.com/help/minimal-reproducible-example) --> \r\n\r\n### Environment\r\n\r\n- OS:\r\n- Python version:\r\n- Locust version: (please dont file issues for anything but the most recent release or prerelease builds)\r\n- Locust command line that you ran:\r\n- Locust file contents (anonymized if necessary):\n", "before_files": [{"content": "from jinja2 import Environment, FileSystemLoader\nimport os\nimport pathlib\nimport datetime\nfrom itertools import chain\nfrom .stats import sort_stats\nfrom .user.inspectuser import get_task_ratio_dict\nfrom html import escape\nfrom json import dumps\n\n\ndef render_template(file, **kwargs):\n    templates_path = os.path.join(pathlib.Path(__file__).parent.absolute(), \"templates\")\n    env = Environment(loader=FileSystemLoader(templates_path), extensions=[\"jinja2.ext.do\"])\n    template = env.get_template(file)\n    return template.render(**kwargs)\n\n\ndef get_html_report(environment, show_download_link=True):\n    stats = environment.runner.stats\n\n    start_ts = stats.start_time\n    start_time = datetime.datetime.fromtimestamp(start_ts).strftime(\"%Y-%m-%d %H:%M:%S\")\n\n    end_ts = stats.last_request_timestamp\n    if end_ts:\n        end_time = datetime.datetime.fromtimestamp(end_ts).strftime(\"%Y-%m-%d %H:%M:%S\")\n    else:\n        end_time = start_time\n\n    host = None\n    if environment.host:\n        host = environment.host\n    elif environment.runner.user_classes:\n        all_hosts = set([l.host for l in environment.runner.user_classes])\n        if len(all_hosts) == 1:\n            host = list(all_hosts)[0]\n\n    requests_statistics = list(chain(sort_stats(stats.entries), [stats.total]))\n    failures_statistics = sort_stats(stats.errors)\n    exceptions_statistics = [\n        {**exc, \"nodes\": \", \".join(exc[\"nodes\"])} for exc in environment.runner.exceptions.values()\n    ]\n\n    history = stats.history\n\n    static_js = []\n    js_files = [\"jquery-1.11.3.min.js\", \"echarts.common.min.js\", \"vintage.js\", \"chart.js\", \"tasks.js\"]\n    for js_file in js_files:\n        path = os.path.join(os.path.dirname(__file__), \"static\", js_file)\n        static_js.append(\"// \" + js_file)\n        with open(path, encoding=\"utf8\") as f:\n            static_js.append(f.read())\n        static_js.extend([\"\", \"\"])\n\n    static_css = []\n    css_files = [\"tables.css\"]\n    for css_file in css_files:\n        path = os.path.join(os.path.dirname(__file__), \"static\", \"css\", css_file)\n        static_css.append(\"/* \" + css_file + \" */\")\n        with open(path, encoding=\"utf8\") as f:\n            static_css.append(f.read())\n        static_css.extend([\"\", \"\"])\n\n    task_data = {\n        \"per_class\": get_task_ratio_dict(environment.user_classes),\n        \"total\": get_task_ratio_dict(environment.user_classes, total=True),\n    }\n\n    res = render_template(\n        \"report.html\",\n        int=int,\n        round=round,\n        requests_statistics=requests_statistics,\n        failures_statistics=failures_statistics,\n        exceptions_statistics=exceptions_statistics,\n        start_time=start_time,\n        end_time=end_time,\n        host=host,\n        history=history,\n        static_js=\"\\n\".join(static_js),\n        static_css=\"\\n\".join(static_css),\n        show_download_link=show_download_link,\n        locustfile=environment.locustfile,\n        tasks=escape(dumps(task_data)),\n    )\n\n    return res\n", "path": "locust/html.py"}]}