It is currently April 27th, 2024, 11:02 am

RSS Feed Help

General topics related to Rainmeter.
tumbleweed1993sf
Posts: 8
Joined: June 1st, 2011, 4:46 am

RSS Feed Help

Post by tumbleweed1993sf »

I'm writing an RSS feed which will tell me the start time of MLB games. The problem is that all of times are written to reflect the Eastern Time Zone, so each time is 3 hours ahead. I'm curious to know if there's some sort of mathematical function I can use to substitute these times to reflect the Pacific Time Zone, or if I have to manually substitute each start time with the respective Pacific start time.

The feed isn't parsed so the start time string isn't separate from the rest of the text, so I cannot simply change the time string. Is this the only way to do it? To parse the time string separately?
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: RSS Feed Help

Post by Kaelri »

Yes, you need to isolate the time (specifically the hour) as a separate string index. On the bright side, if you can do that, performing mathematical functions on it will be very easy.
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: RSS Feed Help

Post by Seahorse »

TimeZone
The timezone value (e.g. TimeZone=+2.0). You can use also fractional values. If this is not given the local time is used.
Looks like someone has though of this for you... ;-)
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: RSS Feed Help

Post by Kaelri »

Seahorse wrote: Looks like someone has though of this for you... ;-)
That won't help with WebParser strings, unfortunately.
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: RSS Feed Help

Post by Seahorse »

Then either use substitution (I don't think their is a limit) or a calc that adds 3... ;)

Code: Select all

Substitute="0000":"0300","0100":"0400","0200":"0500"...etc

Code: Select all

[HoursCalc]
Measure=Calc
Formula=(YourHoursMeter+3)
Mind you possibly some danger of 27 o'clock!
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

tumbleweed1993sf
Posts: 8
Joined: June 1st, 2011, 4:46 am

Re: RSS Feed Help

Post by tumbleweed1993sf »

Alrighty thanks for the input guys. I went ahead and manually inputted each possible start time after all. It took up a lot of space and took quite a while, but it's worth it!
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: RSS Feed Help

Post by smurfier »

If you give me a sample output of the regex that shows exactly what the time looks like, I can probably give you a formula to use.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .