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
3 changes: 3 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ jobs:
- name: Run tests for tls module
shell: bash {0}
run: bash testing/unit/run_test_module.sh tls captures certAuth certs reports root_certs output
- name: Run framework tests
shell: bash {0}
run: bash testing/unit/run_framework_test.sh
- name: Run tests for risk profiles
shell: bash {0}
run: bash testing/unit/run_report_test.sh testing/unit/risk_profile/risk_profile_test.py
Expand Down
10 changes: 7 additions & 3 deletions framework/python/src/core/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
from cryptography.x509.oid import NameOID
from cryptography.hazmat.backends import default_backend

import tzlocal

NETWORK_KEY = 'network'
DEVICE_INTF_KEY = 'device_intf'
INTERNET_INTF_KEY = 'internet_intf'
Expand Down Expand Up @@ -163,9 +165,11 @@ def __init__(self, root_dir):
self.load_certs()

# Fetch the timezone of the host system
tz = util.run_command('cat /etc/timezone')
# TODO: Check if timezone is fetched successfully
self._timezone = tz[0]
try:
self._timezone = str(tzlocal.get_localzone())
except Exception as e:
LOGGER.error(f'Error getting local timezone: {e}')
self._timezone = 'UTC'
LOGGER.debug(f'System timezone is {self._timezone}')

# MQTT client
Expand Down
3 changes: 3 additions & 0 deletions framework/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ APScheduler==3.10.4
Jinja2==3.1.6
beautifulsoup4==4.12.3
html5lib==1.1

#timezone
tzlocal==5.4.3
Loading