Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

matiasmoya
Copy link

@matiasmoya matiasmoya commented Oct 2, 2025

This PR adds the TZ environment variable to ensure timezone-aware applications display the correct local time instead of UTC.

Problem

  • Waybar clock format {:L%A %H:%M} displays UTC time instead of local time in some systems where TZ env variable is not defined
  • Applications launched from shell don't inherit system timezone without TZ variable
  • Users have to hardcode timezone in application configs as workaround

More details about the problem here #2170

Solution

  • Dynamically set TZ environment variable based on system timezone via timedatectl
  • Added to default/bash/envs so it's available in all bash sessions
  • Works globally for all users without hardcoding timezone values

Testing

  • Verified TZ variable is set correctly: echo $TZ shows system timezone
  • Waybar clock now displays local time with :L locale operator
  • Applications launched from shell inherit correct timezone

Fixes #2170

- Dynamically sets TZ based on system timezone via timedatectl
- Fixes waybar clock :L locale operator displaying UTC instead of local time
- Ensures consistent timezone behavior for shell-launched applications
- Works globally for all users without hardcoding timezone values

Fixes basecamp#2170
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.

Waybar clock :L locale operator not respecting system timezone without TZ environment variable

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.