Make the environment variable TZ effective in Docker and default to using the UTC timezone.#628
Make the environment variable TZ effective in Docker and default to using the UTC timezone.#628KUMAKAIHA wants to merge 4 commits intolibrespeed:masterfrom
Conversation
I am very sorry for uploading .DS_Store. Firstly, it was because I didn't know this hidden file is invisible in VSCode. Secondly, I was new to macOS at that time and didn't realize the system would create these files in every folder. So I have now deleted this file and updated the .gitignore file to prevent macOS users from continuing to upload .DS_Store. Regarding the date-time issue in SQL that you mentioned, I am not sure if this will affect MySQL, MSSQL, etc. However, the Docker version should be using SQLite by default. I tried modifying the system time inside the container and other methods, but I couldn't correct the database time. Therefore, I took a different approach by having PHP directly provide the correct timestamp to the database. As for normal deployment scenarios, I may need to investigate further and perhaps use other methods to correct the SQLite time. But at least in the current state, it supports Docker configuration of |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
@KUMAKAIHA please look over all sql files and edit because you changed the schema (added a new column) |
I modified the Dockerfile to include setting the TZ variable, with the default UTC timezone. I also edited telemetry_db.php to add a timestamp for timezone configuration. Additionally, PHP now defaults to using UTC as the timezone when no TZ variable is passed.
I compiled a test Docker on my Mac, and everything runs fine on my Mac. However, the version compiled on Mac is for arm64, but I believe it shouldn't have a big impact on the amd64 version. I only tried adding the timezone as Shanghai and got the correct timezone on the query page. I hope to get more tests to ensure the stability of the project.