Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix timezone env TZ #29

Merged
merged 1 commit into from
Oct 7, 2024
Merged

fix timezone env TZ #29

merged 1 commit into from
Oct 7, 2024

Conversation

liuy
Copy link
Contributor

@liuy liuy commented Oct 7, 2024

For e.g, with $TZ="Asia/Chongqing" on host

"TZ=" + time.tzname[0]

will set TZ=CST, which restult in utils such as 'date' output UTC time instead of CST time because "CST" isn't a valid timezone.

This fix just forwards the $TZ to givsor environment only if it is set on host.

@EtiennePerot
Copy link
Owner

Looks good, now please run python3 build/build_openwebui.py --mode=build and add the two auto-generated files in open-webui to this PR.

(Yes, I agree is a bit weird to have auto-generated files be checked directly into the codebase, but this makes it convenient for Open WebUI users to copy-paste directly from a single file when installing the tool or function. See the dev guide here.)

For e.g, with $TZ="Asia/Chongqing" on host

"TZ=" + time.tzname[0]

will set TZ=CST, which restult in utils such as 'date' output UTC time instead of
CST time because "CST" isn't a valid timezone.

This fix just forwards the $TZ to givsor environment only if it is set on host.

Signed-off-by: Liu Yuan <[email protected]>
@liuy
Copy link
Contributor Author

liuy commented Oct 7, 2024

(Yes, I agree is a bit weird to have auto-generated files be checked directly into the codebase, but this makes it convenient for Open WebUI users to copy-paste directly from a single file when installing the tool or function. See the dev guide here.)

A little bit strange but okay, done :).

@EtiennePerot EtiennePerot merged commit 4d0a8e8 into EtiennePerot:master Oct 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants