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

Wrong timezone used when TZ environment variable is set to anything #280

Open
SeerLite opened this issue Jun 18, 2023 · 0 comments
Open

Comments

@SeerLite
Copy link

This issue is a....

[X ] Bug
[ ] Other kind of issue (Please describe in detail)

Current Behavior

If the environment variable TZ is set to anything (even if it's set to an empty string), i3lock-color uses UTC instead of whatever the system is configured to use.

Expected Behavior

  • If the TZ environment variable describes an invalid timezone, then the system timezone is used.
  • If the TZ environment variable describes a valid timezone, then that timezone is used.
  • If TZ is unset, the system timezone is used (this one works correctly right now).

Reproduction Instructions

Set system timezone to anything other than UTC. For example, I use America/Santiago.
Then:

unset TZ
i3lock --force-clock

will run and use the correct GMT-4 time.
However, if TZ is set to America/Santiago:

export TZ=America/Santiago
i3lock --force-clock

then UTC is used instead.
If TZ is set to anything, both system time and the TZ variable's time is ignored and UTC is used.

export TZ=
i3lock --force-clock

uses UTC too.

Environment

Output of i3lock --version:

i3lock version: i3lock: version 2.13.c.4 © 2010 Michael Stapelberg, © 2015 Cassandra Fox, © 2021 Raymond Li

Where'd you get i3lock-color from?

[ ] AUR package (which one?)
[ ] Built from source yourself
[X] Other (Please describe in detail)

GNU Guix package

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

No branches or pull requests

1 participant