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?
It is currently April 27th, 2024, 11:02 am
RSS Feed Help
-
- Posts: 8
- Joined: June 1st, 2011, 4:46 am
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: RSS Feed Help
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.
-
- Posts: 1175
- Joined: June 9th, 2010, 5:56 pm
- Location: Locks heath, UK
Re: RSS Feed Help
Looks like someone has though of this for you...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.
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: RSS Feed Help
That won't help with WebParser strings, unfortunately.Seahorse wrote: Looks like someone has though of this for you...
-
- Posts: 1175
- Joined: June 9th, 2010, 5:56 pm
- Location: Locks heath, UK
Re: RSS Feed Help
Then either use substitution (I don't think their is a limit) or a calc that adds 3...
Mind you possibly some danger of 27 o'clock!
Code: Select all
Substitute="0000":"0300","0100":"0400","0200":"0500"...etc
Code: Select all
[HoursCalc]
Measure=Calc
Formula=(YourHoursMeter+3)
-
- Posts: 8
- Joined: June 1st, 2011, 4:46 am
Re: RSS Feed Help
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!
-
- Moderator
- Posts: 1931
- Joined: January 29th, 2010, 1:43 am
- Location: Willmar, MN
Re: RSS Feed Help
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 . . .
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 . . .