MarcinOrlowski / html-clock-plasmoid

Configurable and lightweight clock widget for KDE. Stylable with QT supported subset of HTML markup, supporting variety of usable placeholders to design clock widget as you like.
67 stars 6 forks source link

Add timezone support #1

Open MarcinOrlowski opened 3 years ago

MarcinOrlowski commented 3 years ago

Add timezone support, so user can set up any TZ to be user by the clock, regardless of system settings

Jesus-M commented 3 years ago

Adding timezone (TZ) could allow also multiples times at once from very simple to all possibilities, something like:

\<p>{hh}:{ii} {t:UTC} # UTC time \<p>{hh}:{ii} {t:CET} # Central European time

MarcinOrlowski commented 3 years ago

That's not that trivial as placeholders are just outputs, not inputs as per your example. But as I need multiple TZ supported myself, that's going to be implemented sooner than later.

myrkat commented 2 years ago

I am not seeing Timezone offset work as it should. I am in the UTC-7 (Pacific, PDT) time zone, so I set the Timezone offset to +7 (to get UTC); however, when I do a "+07:00" I get 10:05 (24-hr clock, and local time is 15:05 PDT, 15 + 7 ≠ 10) for grins, I also tried setting it to "-07:00" I still get 10:05 ( 15 -7 ≠ 10, but when I use -07:00 I also get 10 in the {hh} field). UPDATE: I tried -17:00 and it converts my UTC-7/PDT time of 15:xx to 00:xx (which is correct). Why 17? Who knows.

myrkat commented 2 years ago

Adding timezone (TZ) could allow also multiples times at once from very simple to all possibilities, something like:

{hh}:{ii} {t:UTC} # UTC time

{hh}:{ii} {t:CET} # Central European time

This would be awesome; however, it would require HTML or internal time code to do math and have variables. I'd love to say {hh-5} or whatever. I think the easiest way would be to "add clocks" within the app, calling it "Default, Clock1, Clock2, etc." and have the user pick the timezone/local for each. Just my 2¢.