Closed rochdikhalid closed 2 years ago
I could fix the bug using tzselect
and .profile
. Here are some instructions you can follow to fix this timezone bug:
tzselect
command.Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", or "TZ".
1) Africa 7) Europe
2) Americas 8) Indian Ocean
3) Antarctica 9) Pacific Ocean
4) Asia 10) coord - I want to use geographical coordinates.
5) Atlantic Ocean 11) TZ - I want to specify the timezone using the Posix TZ format.
6) Australia
#? 1
Please select a country whose clocks agree with yours.
1) Algeria 12) Congo (Rep.) 23) Guinea 34) Morocco 45) South Sudan
2) Angola 13) Côte d'Ivoire 24) Guinea-Bissau 35) Mozambique 46) Spain
3) Benin 14) Djibouti 25) Kenya 36) Namibia 47) St Helena
4) Botswana 15) Egypt 26) Lesotho 37) Niger 48) Sudan
5) Burkina Faso 16) Equatorial Guinea 27) Liberia 38) Nigeria 49) Tanzania
6) Burundi 17) Eritrea 28) Libya 39) Rwanda 50) Togo
7) Cameroon 18) Eswatini (Swaziland) 29) Madagascar 40) Sao Tome & Principe 51) Tunisia
8) Central African Rep. 19) Ethiopia 30) Malawi 41) Senegal 52) Uganda
9) Chad 20) Gabon 31) Mali 42) Sierra Leone 53) Western Sahara
10) Comoros 21) Gambia 32) Mauritania 43) Somalia 54) Zambia
11) Congo (Dem. Rep.) 22) Ghana 33) Mayotte 44) South Africa 55) Zimbabwe
#? 34
Select Yes if the given information is OK (eg. Yes: 1)
The following information has been given:
Morocco
Therefore TZ='Africa/Casablanca' will be used. Selected time is now: Mon 18 Apr 2022 08:44:37 AM +00. Universal Time is now: Mon 18 Apr 2022 08:44:37 AM UTC. Is the above information OK? 1) Yes 2) No
5. Make the change permanent and append it to `.profile` as follows:
You can make this change permanent for yourself by appending the line TZ='Africa/Casablanca'; export TZ to the file '.profile' in your home directory; then log out and log in again.
Here is that TZ value again, this time on standard output so that you can use the /usr/bin/tzselect command in shell scripts: Africa/Casablanca
6. Go to the Home directory and run `.profile` to append your changes. Here is an example of how to append your changes to your `.profile`:
TZ='Africa/Casablanca' export TZ
7. Next, log out and log in again to confirm your changes.
8. Then, activate the `gst` environment and go to the directory **OpenBBTerminal**.
9. Now, you can run the terminal using `python terminal.py` and have fun.
Also, you can read this [thread](https://github.com/regebro/tzlocal/issues/79) for more details on how to fix the same bug.
I forked the OpenBBTerminal repository and I followed the instructions to install the project on my Ubuntu machine to explore the source code repository (Developer Approach) but when I want to run and use the terminal by this command
python terminal.py
, the following bug has occurred:I did a little research and I found that the library is looking up the timezone configuration. My timezone is UTC and it seems like other parts of the system disagree.
For more details, here is the full traceback concerning this bug:
Desktop: