It is currently October 31st, 2024, 11:46 pm

Rainmeter Capabilities / World Clock / Single Clock

Get help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 8587
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Rainmeter Capabilities / World Clock / Single Clock

Post by Yincognito »

jsmorley wrote: January 16th, 2019, 4:49 pm Well, if you want to hit some web site in Russia once a minute to get / validate a value that changes twice a year, that's one approach. I wouldn't myself.
But that's exactly what I was saying, LOL. No need to update the DST part that often. The time itself, after it has been correctly DST adjusted (once every -insert longer interval here-), can run without interrogating anything - after all, seconds have the same duration everywhere. Basically, what I would envision is just have the DST updated at longer intervals, then use the difference compared to your local time to display the time normally (aka using your local clock), until the next DST check.
jsmorley wrote: January 16th, 2019, 4:49 pmBut then, I would not attempt a world clock. It would be unsatisfying if it was not really correct, and way more trouble than it is worth if it was.

"Hey Google, what time is it in Paris?"
On that we agree. But Google must be using some feed as well to display that in your browser ... even if it's his own feed :D I'm just saying that if they can use some feed to get that info, why not everybody, and why not in Rainmeter as well? Accuracy and availabilty is all that you'd need. There are quite a few apps that display such things, which leads me to believe that they most likely used such a feed and the process isn't that complicated.

Now on doing that yourself, that's a totally different proposition, and I completely agree with you that such an endeavour is not worth the effort.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22892
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Rainmeter Capabilities / World Clock / Single Clock

Post by jsmorley »

Well, as I said in my very first reply, eclectic-tech has an approach that works for him, and would likely be fine for most folks.

My subsequent posts were mostly thinking about this in terms of the most technically "correct" way to do this. Sure, a 10-minute lag in accuracy twice a year is certainly not a big deal, but it's not really "right" either. World wars have been started over lesser discrepancies... Archduke Ferdinand was told it was about a 10-minute drive. ;-)

I think there is some standards body, some "World Institute of Time" or some such, that has and keeps all the timezone and DST changes for just about every spot on earth. Big companies like Google and Microsoft can subscribe to this information, and download and store it in some local database. Windows actually DOES know all the timezone and DST stuff for a boatload of locations, it is all kept accurate via Windows Update, but it does't "expose" them in a way that is easy to get to. This information is used in Windows when you set the timezone for your local PC, where it offers a handful of big locations for each timezone.
User avatar
Yincognito
Rainmeter Sage
Posts: 8587
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Rainmeter Capabilities / World Clock / Single Clock

Post by Yincognito »

jsmorley wrote: January 16th, 2019, 5:17 pmWell, as I said in my very first reply, eclectic-tech has an approach that works for him, and would likely be fine for most folks.
Indeed, he's doing it quite efficiently - and his skins always look nice. :thumbup:
jsmorley wrote: January 16th, 2019, 5:17 pmMy subsequent posts were mostly thinking about this in terms of the most technically "correct" way to do this.
I noticed. You were correct the whole time - my only observation was that there was no need to "reinvent the wheel" on this. I've tried this (i.e. reinventing the wheel) myself a few times in a Rainmeter skin (not on timezone aware clocks, however), and most of the times I came to the conclusion that it was not worth the effort, especially when you can find the exact thing "ready made" - you just need to grab it and show it on screen, also in Rainmeter. WebParser is sometimes a time saver.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
SilverAzide
Rainmeter Sage
Posts: 2754
Joined: March 23rd, 2015, 5:26 pm

Re: Rainmeter Capabilities / World Clock / Single Clock

Post by SilverAzide »

jsmorley wrote: January 16th, 2019, 5:17 pm I think there is some standards body, some "World Institute of Time" or some such, that has and keeps all the timezone and DST changes for just about every spot on earth.
I think that would either be the Freemasons or the Illuminati. Possibly the International Organization for Standardization (ISO), but no one really knows for sure.
jsmorley wrote: January 16th, 2019, 5:17 pm Windows actually DOES know all the timezone and DST stuff for a boatload of locations, it is all kept accurate via Windows Update, but it does't "expose" them in a way that is easy to get to. This information is used in Windows when you set the timezone for your local PC, where it offers a handful of big locations for each timezone.
Perhaps a plug-in (or Rainmeter enhancement, wink-wink) that calls the Win32 API TzSpecificLocalTimeToSystemTime()...? The full timezone info, including the exact date/time of the DST switch can be retrieved. The caller specifies the time to convert and the target timezone, so you could pick any time and location you wanted. And since it would be lightning fast as an API call, you could hammer it every second if you wanted.

Which leads me to wonder... shouldn't the Time measure be doing this anyway when you specify the TimeZone option on the measure?
Gadgets Wiki GitHub More Gadgets...
User avatar
jsmorley
Developer
Posts: 22892
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Rainmeter Capabilities / World Clock / Single Clock

Post by jsmorley »

SilverAzide wrote: January 17th, 2019, 12:30 am I think that would either be the Freemasons or the Illuminati. Possibly the International Organization for Standardization (ISO), but no one really knows for sure.


Perhaps a plug-in (or Rainmeter enhancement, wink-wink) that calls the Win32 API TzSpecificLocalTimeToSystemTime()...? The full timezone info, including the exact date/time of the DST switch can be retrieved. The caller specifies the time to convert and the target timezone, so you could pick any time and location you wanted. And since it would be lightning fast as an API call, you could hammer it every second if you wanted.

Which leads me to wonder... shouldn't the Time measure be doing this anyway when you specify the TimeZone option on the measure?
What does timezone have to do with DST?

It's quite difficult to localize the available locations that Windows has.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2754
Joined: March 23rd, 2015, 5:26 pm

Re: Rainmeter Capabilities / World Clock / Single Clock

Post by SilverAzide »

jsmorley wrote: January 17th, 2019, 1:29 am What does timezone have to do with DST?
Welp... I guess it's because when I go into the Date & Time applet in the Windows Control Panel and select a time zone from that big old list, it then knows the exact DST rules for the time zone I selected. And why that big ol' list has multiple choices for, say UTC-05:00...

If you asked me "what does time zone bias have to do with DST", I'd say ... nuthin'.
Gadgets Wiki GitHub More Gadgets...
User avatar
jsmorley
Developer
Posts: 22892
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Rainmeter Capabilities / World Clock / Single Clock

Post by jsmorley »

SilverAzide wrote: January 17th, 2019, 2:28 am Welp... I guess it's because when I go into the Date & Time applet in the Windows Control Panel and select a time zone from that big old list, it then knows the exact DST rules for the time zone I selected. And why that big ol' list has multiple choices for, say UTC-05:00...

If you asked me "what does time zone bias have to do with DST", I'd say ... nuthin'.
I would propose that there can be many implementations of DST in a single timezone like UTC-05:00. Every country, and in some cases regions within countries, have sovereign control over if and how they implement DST.