[Gambas-user] New component gb.rss to generate and parse RSS documents

Tobias Boege taboege at ...626...
Tue Apr 18 20:04:51 CEST 2017


On Tue, 18 Apr 2017, Benoît Minisini wrote:
> > About the incorporation of timezones in gb.web.feed (the last thing before
> > I mark the component as "Unfinished but stable"), my plan is to replace the
> > Date variables in the Rss* classes by an RssDate compound, consisting of a
> > normalised Date and a Timezone string (or constant), with an "apply timezone"
> > method probably. If you have a better idea, please let me know.
> 
> What for? Timezone is only needed when dealing with Date as strings. 
> Internally, all Date values should be stored UTC. In computing, time is 
> absolute.
> 
> In other words, every date value has as many string representations as 
> the number of possible timezones.
> 

I agree, but in the conversion Gambas object -> XML string, I want to give
the user a way to specify the timezone that is printed in the string
representation, as you do in ToRFC822().

Since this timezone may be different for every RssItem (or even different
between PubDate and LastBuildDate for the same RssItem), I have to store
it somewhere along the normalised (UTC) Date and not have it passed as an
argument to Rss.ToString().

When reading XML string -> Gambas object this timezone property would be
rather useless, yes.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list