Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Calendar integration is one day early #2242

Closed
jywarren opened this issue Feb 5, 2018 · 2 comments
Closed

Google Calendar integration is one day early #2242

jywarren opened this issue Feb 5, 2018 · 2 comments
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute

Comments

@jywarren
Copy link
Member

jywarren commented Feb 5, 2018

Please describe the problem (or idea)

What happened just before the problem occurred? Or what problem could this idea solve?

I posted this note with assoc. power tag for the date:

https://publiclab.org/notes/warren/02-05-2018/local-environmental-action-2018-in-boston

What did you expect to see that you didn't?

The RSS feed generated:

https://publiclab.org/feed/tag/event:*.rss

From this code:

https://github.com/publiclab/plots2/blob/master/app/views/tag/rss.rss.builder

...is read by IFTTT.com and put on our Google calendar:

https://publiclab.org/events

But it seems to place it one day early. I'm wondering if this is a time zone error?

Indeed! I see it's listed as GMT time (+0): <pubDate>Sat, 17 Feb 2018 00:00:00 +0000</pubDate>

I think if we can fix that on this line -- perhaps by substituting +4 -- it'd start working:

xml.pubDate DateTime.strptime(node.power_tag('date'), "%m-%d-%Y").rfc822

@jywarren jywarren added bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute labels Feb 5, 2018
@jywarren
Copy link
Member Author

This is still an issue -- and a bit more complex -- the changes we made in #2279 seem to have the right timezone offset now, but is mysteriously still on the wrong day -- see below:

<pubDate>Sat, 03 Mar 2018 19:00:00 -0500</pubDate>


<item>
<title>Particle Visualization Event in Hixton, WI</title>
<author>gretchengehrke</author>
<pubDate>Sat, 03 Mar 2018 19:00:00 -0500</pubDate>
<link>
https://publiclab.org/notes/gretchengehrke/02-20-2018/particle-visualization-event-in-hixton-wi
</link>
<description>
<![CDATA[
<img src='https://publiclab.org/system/images/photos/000/023/658/medium/IMG_20171104_155302.jpg' alt=''><p><h2>Event details</h2> <p>Public Lab is hosting an event to visualize airborne particles from frac sand mining using samples collected on properties next to the mine in Hixton.</p> <p><strong>What: </strong> DIY microscope visualization of airborne particles from frac sand mining and processing</p> <p><strong>Where: </strong> The Sedelbauer's farm; N8970 South Adams Road Hixton, WI 54635</p> <p><strong>When: </strong> 1pm - 3pm, Sunday March 4th</p> <p><strong>Why: </strong> This event will include a hands-on activity for a new technique that could be used in frac sand advocacy, and will include an open discussion to plan next steps. We'll learn about the specific issues faced by farmers adjacent to frac sand mines as the Sedelbauers will share their experience and what they've noticed with their animals.</p> <p>Please spread the word and save the date! We look forward to seeing you in Hixton!</p> <h2>Background</h2> <p>To learn more about environmental issues related to frac sand mining and processing, please see the Public Lab <a href="/wiki/frac-sand">frac sand wiki</a>. To see community research and activities related to frac sand issues, please see the <a href="/tag/frac-sand">frac sand tag</a>. This event will feature <a href="/wiki/microscopes">DIY microscopes</a> too.</p> </p>
]]>
</description>
<guid>https://publiclab.org/notes/show/15788</guid>
</item>

https://publiclab.org/feed/tag/event:*.rss

based on https://publiclab.org/notes/gretchengehrke/02-20-2018/particle-visualization-event-in-hixton-wi

@jywarren
Copy link
Member Author

Attempted fix in 14afb7f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute
Projects
None yet
Development

No branches or pull requests

1 participant