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

date format ignores locale when timezone not set #1393

Closed
nullobsi opened this issue Jan 14, 2022 · 0 comments · Fixed by #1394
Closed

date format ignores locale when timezone not set #1393

nullobsi opened this issue Jan 14, 2022 · 0 comments · Fixed by #1394

Comments

@nullobsi
Copy link
Contributor

nullobsi commented Jan 14, 2022

When the timezone is not set, the locale, either defined or system locale is ignored and it always uses mon, tue, thu, etc for the week name. I think this is because when the timezone is set, Waybar uses the fmt library.

if (!is_timezone_fixed()) {
// As date dep is not fully compatible, prefer fmt
tzset();
auto localtime = fmt::localtime(std::chrono::system_clock::to_time_t(now));
text = fmt::format(format_, localtime);
} else {
text = fmt::format(format_, wtime);
}

Is there some way to get Waybar to use the system time and the locale at the same time?

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 a pull request may close this issue.

1 participant