prospector
prospector copied to clipboard
[BUG] Timezone shenanigans with Django
Describe the bug When trying to run prospector on a Django project, "Finished" time seems to be taken from another time zone.
To Reproduce
$ django-admin startproject prospector_test
$ cd prospector_test
$ DJANGO_SETTINGS_MODULE=prospector_test.settings prospector
...
Check Information
=================
Started: 2022-04-01 20:24:26.097744
Finished: 2022-04-01 13:24:27.867276
Time Taken: -25198.23 seconds
Expected behavior
Following is taken from prospector output when ran without DJANGO_SETTINGS_MODULE:
Check Information
=================
Started: 2022-04-01 20:21:34.312963
Finished: 2022-04-01 20:21:36.034789
Time Taken: 1.72 seconds
Environment (please complete the following information):
- OS: Linux
- Tool: probably pylint, as when I do not specify
DJANGO_SETTINGS_MODULEtime is calculated as expected - Prospector version: 1.1.7
- Python version: 3.10.2
Additional information
I am in a UTC+7 time zone, so it seems that "Finished" time is from UTC+0.