diff --git a/src/algokit/core/doctor.py b/src/algokit/core/doctor.py index fa379081..e3f43fc8 100644 --- a/src/algokit/core/doctor.py +++ b/src/algokit/core/doctor.py @@ -24,7 +24,7 @@ class ProcessResult: def get_date() -> ProcessResult: - return ProcessResult(format(datetime.now(timezone.utc).astimezone().isoformat()), 0) + return ProcessResult(format(datetime.now(timezone.utc).isoformat()), 0) def get_algokit_info() -> ProcessResult: diff --git a/tests/doctor/test_doctor.py b/tests/doctor/test_doctor.py index 9e36658c..3a97b83e 100644 --- a/tests/doctor/test_doctor.py +++ b/tests/doctor/test_doctor.py @@ -1,5 +1,5 @@ import typing -from datetime import datetime, timezone +from datetime import datetime from pathlib import Path import click @@ -33,8 +33,7 @@ def mock_dependencies(mocker: MockerFixture) -> None: mocked_os.version.return_value = "linux_version" # Mock datetime mocked_date = mocker.patch("algokit.core.doctor.datetime") - fake_now = datetime(1990, 12, 31, 10, 9, 8, tzinfo=timezone.utc).astimezone() - mocked_date.now.return_value = fake_now + mocked_date.now.return_value = datetime(1990, 12, 31, 10, 9, 8) # Mock shutil mocked_shutil = mocker.patch("algokit.core.doctor.shutil") mocked_shutil.which.return_value = "/Library/Frameworks/Python.framework/Versions/3.11/bin/python3" diff --git a/tests/doctor/test_doctor.test_doctor_all_failed_on_mac.approved.txt b/tests/doctor/test_doctor.test_doctor_all_failed_on_mac.approved.txt index 04d68ff5..6d822121 100644 --- a/tests/doctor/test_doctor.test_doctor_all_failed_on_mac.approved.txt +++ b/tests/doctor/test_doctor.test_doctor_all_failed_on_mac.approved.txt @@ -8,7 +8,7 @@ DEBUG: Running 'pipx --version' in '{current_working_directory}' DEBUG: Running 'poetry --version' in '{current_working_directory}' DEBUG: Running 'node -v' in '{current_working_directory}' DEBUG: Running 'npm -v' in '{current_working_directory}' -Time: 1990-12-31T18:09:08+08:00 +Time: 1990-12-31T10:09:08 AlgoKit: None found Brew: None found OS: Mac OS X mac_os_version diff --git a/tests/doctor/test_doctor.test_doctor_successful_on_linux.approved.txt b/tests/doctor/test_doctor.test_doctor_successful_on_linux.approved.txt index 0c798c5d..6e2b8325 100644 --- a/tests/doctor/test_doctor.test_doctor_successful_on_linux.approved.txt +++ b/tests/doctor/test_doctor.test_doctor_successful_on_linux.approved.txt @@ -23,7 +23,7 @@ DEBUG: Running 'node -v' in '{current_working_directory}' DEBUG: node: v18.12.1 DEBUG: Running 'npm -v' in '{current_working_directory}' DEBUG: npm: 8.19.2 -Time: 1990-12-31T18:09:08+08:00 +Time: 1990-12-31T10:09:08 AlgoKit: 1.2.3 /pipx/venvs/algokit OS: Unix/Linux linux_version Docker: 20.10.21 diff --git a/tests/doctor/test_doctor.test_doctor_successful_on_mac.approved.txt b/tests/doctor/test_doctor.test_doctor_successful_on_mac.approved.txt index c6a50fe9..2f0329dd 100644 --- a/tests/doctor/test_doctor.test_doctor_successful_on_mac.approved.txt +++ b/tests/doctor/test_doctor.test_doctor_successful_on_mac.approved.txt @@ -26,7 +26,7 @@ DEBUG: Running 'node -v' in '{current_working_directory}' DEBUG: node: v18.12.1 DEBUG: Running 'npm -v' in '{current_working_directory}' DEBUG: npm: 8.19.2 -Time: 1990-12-31T18:09:08+08:00 +Time: 1990-12-31T10:09:08 AlgoKit: 1.2.3 /pipx/venvs/algokit Brew: 3.6.15 OS: Mac OS X mac_os_version diff --git a/tests/doctor/test_doctor.test_doctor_successful_on_windows.approved.txt b/tests/doctor/test_doctor.test_doctor_successful_on_windows.approved.txt index 6ad58ed5..8d790389 100644 --- a/tests/doctor/test_doctor.test_doctor_successful_on_windows.approved.txt +++ b/tests/doctor/test_doctor.test_doctor_successful_on_windows.approved.txt @@ -26,7 +26,7 @@ DEBUG: Running 'node -v' in '{current_working_directory}' DEBUG: node: v18.12.1 DEBUG: Running 'npm -v' in '{current_working_directory}' DEBUG: npm: 8.19.2 -Time: 1990-12-31T18:09:08+08:00 +Time: 1990-12-31T10:09:08 AlgoKit: 1.2.3 /pipx/venvs/algokit Chocolatey: 0.10.15 OS: Windows windows_version diff --git a/tests/doctor/test_doctor.test_doctor_with_copy.approved.txt b/tests/doctor/test_doctor.test_doctor_with_copy.approved.txt index c6a50fe9..2f0329dd 100644 --- a/tests/doctor/test_doctor.test_doctor_with_copy.approved.txt +++ b/tests/doctor/test_doctor.test_doctor_with_copy.approved.txt @@ -26,7 +26,7 @@ DEBUG: Running 'node -v' in '{current_working_directory}' DEBUG: node: v18.12.1 DEBUG: Running 'npm -v' in '{current_working_directory}' DEBUG: npm: 8.19.2 -Time: 1990-12-31T18:09:08+08:00 +Time: 1990-12-31T10:09:08 AlgoKit: 1.2.3 /pipx/venvs/algokit Brew: 3.6.15 OS: Mac OS X mac_os_version diff --git a/tests/doctor/test_doctor.test_doctor_with_docker_compose_warning.approved.txt b/tests/doctor/test_doctor.test_doctor_with_docker_compose_warning.approved.txt index 0383a75a..e37e6254 100644 --- a/tests/doctor/test_doctor.test_doctor_with_docker_compose_warning.approved.txt +++ b/tests/doctor/test_doctor.test_doctor_with_docker_compose_warning.approved.txt @@ -26,7 +26,7 @@ DEBUG: Running 'node -v' in '{current_working_directory}' DEBUG: node: v18.12.1 DEBUG: Running 'npm -v' in '{current_working_directory}' DEBUG: npm: 8.19.2 -Time: 1990-12-31T18:09:08+08:00 +Time: 1990-12-31T10:09:08 AlgoKit: 1.2.3 /pipx/venvs/algokit Brew: 3.6.15 OS: Mac OS X mac_os_version diff --git a/tests/doctor/test_doctor.test_doctor_with_git_warning_on_mac.approved.txt b/tests/doctor/test_doctor.test_doctor_with_git_warning_on_mac.approved.txt index 742ca498..3d4aefeb 100644 --- a/tests/doctor/test_doctor.test_doctor_with_git_warning_on_mac.approved.txt +++ b/tests/doctor/test_doctor.test_doctor_with_git_warning_on_mac.approved.txt @@ -26,7 +26,7 @@ DEBUG: Running 'node -v' in '{current_working_directory}' DEBUG: node: v18.12.1 DEBUG: Running 'npm -v' in '{current_working_directory}' DEBUG: npm: 8.19.2 -Time: 1990-12-31T18:09:08+08:00 +Time: 1990-12-31T10:09:08 AlgoKit: 1.2.3 /pipx/venvs/algokit Brew: 3.6.15 OS: Mac OS X mac_os_version diff --git a/tests/doctor/test_doctor.test_doctor_with_git_warning_on_windows.approved.txt b/tests/doctor/test_doctor.test_doctor_with_git_warning_on_windows.approved.txt index 464050eb..54fdab78 100644 --- a/tests/doctor/test_doctor.test_doctor_with_git_warning_on_windows.approved.txt +++ b/tests/doctor/test_doctor.test_doctor_with_git_warning_on_windows.approved.txt @@ -25,7 +25,7 @@ DEBUG: Running 'node -v' in '{current_working_directory}' DEBUG: node: v18.12.1 DEBUG: Running 'npm -v' in '{current_working_directory}' DEBUG: npm: 8.19.2 -Time: 1990-12-31T18:09:08+08:00 +Time: 1990-12-31T10:09:08 AlgoKit: 1.2.3 /pipx/venvs/algokit Chocolatey: 0.10.15 OS: Windows windows_version