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

timezone on clock module #223

Closed
spk opened this issue Mar 15, 2019 · 6 comments
Closed

timezone on clock module #223

spk opened this issue Mar 15, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@spk
Copy link
Contributor

spk commented Mar 15, 2019

Hi,
Nice project thanks ! It would be nice to be able to set the timezone on the config file so we don't have to bother to set the TZ env var and reload the session, wdyt ?
Cheers

@Alexays Alexays added question Further information is requested enhancement New feature or request and removed question Further information is requested labels Mar 16, 2019
spk added a commit to spk/Waybar that referenced this issue Apr 23, 2019
spk added a commit to spk/Waybar that referenced this issue May 2, 2019
spk added a commit to spk/Waybar that referenced this issue May 8, 2019
@rif
Copy link

rif commented Jul 16, 2019

Also, the possibility of adding multiple clocks in different timezones would be a plus!

@layus
Copy link
Contributor

layus commented Oct 4, 2019

I misunderstood this one as being about displaying the current timezone in the clock widget, which can already be done with %Z of course.

At the moment, waybar does not detect system timezone changes, but this should be fixed soon (see #479). By default, the clock should reflect the system's timezone.

So this feature chiefly adds

[...] the possibility of adding multiple clocks in different timezones [...].

@mjec
Copy link
Contributor

mjec commented Dec 12, 2019

I'd be happy to work on this (specifically, being able to specify the TZ for a particular clock module), and I think the easiest way to make this happen would be to bring in Howard Hinnant's tz.h -- is adding a new dependency for this ok?

@ZeiP
Copy link

ZeiP commented Jan 20, 2020

Adding multiple clocks with different time zones is the most important functionality I'm missing when changing from py3status. Is there something I can do to help get this done?

@layus
Copy link
Contributor

layus commented Jan 20, 2020

@mjec @ZeiP Since Alexays seems okay with adding a dependency on tz.h, there remains to make the actual pull request.
That would entail

  1. Updade clock.cpp to actually use tz.h
  2. Augment the clock module config to support a timezone argument.
  3. Check that it works correctly with two modules (i.e. the timezones are actually different).

Most of this should be straightforward, given that clock.cpp is 31 lines :-). A potential unknown pain point will be the formatting, but I guess there are ways to convert a tz.h time to a more standard value for formatting with fmt.

@mjec
Copy link
Contributor

mjec commented Jan 21, 2020

PR #560 created which adds timzeone support -- feedback extremely welcome, as I don't normally write C++.

Alexays added a commit that referenced this issue Jan 23, 2020
Add timezone support to clock module (closes #223)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants