khendar
01-18-2008, 01:19 AM
I'm working on a script which reads an RSS feed, uses LastRSS to parse the feed and then inserts records into a calendar application using the pubDate field as the appointment date.
The problem I am having is getting the timezone on the calendar record correct. I can read the date from the feed in any format I wish, but the calendar only takes Unix Epoch timestamps, which are UTC. When I read the feed pubDate in as U and insert it to the calendar the dates are off by the timezone offset.
How can I determine the timezone offset based on the feed data, and adjust the timestamp that gets inserted into the calendar accordingly ?
The problem I am having is getting the timezone on the calendar record correct. I can read the date from the feed in any format I wish, but the calendar only takes Unix Epoch timestamps, which are UTC. When I read the feed pubDate in as U and insert it to the calendar the dates are off by the timezone offset.
How can I determine the timezone offset based on the feed data, and adjust the timestamp that gets inserted into the calendar accordingly ?