Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ typecode==30.2.0
typecode-libmagic==5.39.210531
typing_extensions==4.13.0
tzlocal==5.3.1
tzdata==2026.5
univers==32.0.1
uritemplate==4.2.0
urllib3==2.6.3
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ typecode==30.2.0
typecode-libmagic==5.39.210531
typing_extensions==4.13.0
tzlocal==5.3.1
tzdata==2026.5
univers==32.0.1
uritemplate==4.2.0
urllib3==2.6.3
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ install_requires =
django-environ==0.11.2
gunicorn==23.0.0
django-altcha==0.2.0
tzdata==2026.5

# for the API doc
drf-spectacular[sidecar]==0.24.2
Expand Down
18 changes: 11 additions & 7 deletions vulnerabilities/middleware/timezone.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ def __init__(self, get_response):
self.get_response = get_response

def __call__(self, request):
try:
# Activate local timezone for user using cookies
tzname = request.COOKIES.get("user_timezone")
if tzname:
tzname = request.COOKIES.get("user_timezone")
if tzname:
try:
timezone.activate(zoneinfo.ZoneInfo(tzname))
else:
except Exception as e:
timezone.deactivate()
except Exception as e:
else:
timezone.deactivate()

try:
response = self.get_response(request)
finally:
timezone.deactivate()

return self.get_response(request)
return response
2 changes: 1 addition & 1 deletion vulnerabilities/templates/pipeline_dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ <h1>Pipeline Dashboard</h1>
</div>
<div class="column has-text-grey" style="flex: 0 0 18%;">
{% if schedule.latest_run_end_date %}
{{ schedule.latest_run_end_date|date:"Y-m-d h:i a T" }}
{{ schedule.latest_run_end_date|date:"Y-m-d h:i A T" }}
{% else %}
N/A
{% endif %}
Expand Down
6 changes: 3 additions & 3 deletions vulnerabilities/templates/pipeline_run_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ <h1 class="title">{{ pipeline_name }} Run Log</h1>
<p class="is-size-7 has-text-weight-semibold">Start</p>
<p class="has-text-grey is-size-7">
{% if run.run_start_date %}
{{ run.run_start_date|date:"Y-m-d h:i a T" }}
{{ run.run_start_date|date:"Y-m-d h:i A T" }}
{% else %}
N/A
{% endif %}
Expand All @@ -89,15 +89,15 @@ <h1 class="title">{{ pipeline_name }} Run Log</h1>
<p class="is-size-7 has-text-weight-semibold">End</p>
<p class="has-text-grey is-size-7">
{% if run.run_end_date %}
{{ run.run_end_date|date:"Y-m-d h:i a T" }}
{{ run.run_end_date|date:"Y-m-d h:i A T" }}
{% else %}
N/A
{% endif %}
</p>
</div>
<div class="column is-one-fifth-desktop is-one-quarter-tablet is-half-mobile">
<p class="is-size-7 has-text-weight-semibold">Created</p>
<p class="has-text-grey is-size-7">{{ run.created_date|date:"Y-m-d h:i a T" }}</p>
<p class="has-text-grey is-size-7">{{ run.created_date|date:"Y-m-d h:i A T" }}</p>
</div>
<div class="column is-one-fifth-desktop is-one-quarter-tablet is-half-mobile">
<p class="is-size-7 has-text-weight-semibold">Version</p>
Expand Down
4 changes: 2 additions & 2 deletions vulnerabilities/templates/pipeline_run_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ <h1>{{ pipeline_name }} Runs</h1>
</div>
<div class="column is-one-fifth has-text-grey">
{% if run.run_start_date %}
{{ run.run_start_date|date:"Y-m-d h:i a T" }}
{{ run.run_start_date|date:"Y-m-d h:i A T" }}
{% else %}
N/A
{% endif %}
</div>
<div class="column is-one-fifth has-text-grey">
{% if run.run_end_date %}
{{ run.run_end_date|date:"Y-m-d h:i a T" }}
{{ run.run_end_date|date:"Y-m-d h:i A T" }}
{% else %}
N/A
{% endif %}
Expand Down