Closed InciteDemocracy closed 7 years ago
@aaghevli @KamillaKhabibrakhmanova I notice that for some events, we are getting a start date and end date in Zulu (ex: 2017-05-02T00:30:00Z
) time as opposed to the UTC time format we've been getting for the vast majority of start_date and end_date values (ex: 2017-05-01T18:00:00-07:00
).
So we're seeing data coming in like this (notice the difference in the start_date and end_date formats between the two events):
"_id": "5902523074ceb9d94e194e28",
"__v": 0,
"location": null,
"guests_can_invite_others": true,
"end_date": "2017-05-02T03:30:00Z",
"start_date": "2017-05-02T00:30:00Z",
"total_accepted": 12,
"featured_image_url": "http://res.cloudinary.com/hqrdtqlz0/image/upload/facebook:697943717052022",
"description": "Join us for this national day of action and resistance for Immigrants, Refugees, Workers and Minorities. The March begins at 5:30 PM at 750 Anderson St, Vancouver WA 98661, followed by the Rally, which starts at 6:00 PM at Esther Short Park. \n\nThis event is co-sponsored by the ACLU People Power, North County Indivisible, 18th Legislative District Democrats Indivisible, LULAC, MoveOn Clark County, LCRG, Indivisible Greater Vancouver, and OneAmerica. \n\nFor more information, call 360-334-0238 or email glicerio@weareoneamerica.org.",
"title": "March & Rally for Immigrants, Refugees, Workers & Minorities",
"name": "March & Rally for Immigrants, Refugees, Workers & Minorities",
"origin_system": "Facebook",
"modified_date": "2017-05-02T11:33:20.537Z",
"created_date": "2017-05-02T11:33:20.537Z",
"identifiers": ["facebook:212871252533894"]
}, {
"_id": "58e9a50d74ceb9d94e193e2d",
"__v": 0,
"date": "2017-04-09T16:32:17.983Z",
"location": {
"identifiers": ["facebook:1218606431616456"],
"origin_system": "Facebook",
"venue": "Judkins Park, Seattle, Washington",
"address_lines": [],
"locality": "Seattle",
"region": "WA",
"postal_code": null,
"location": {
"longitude": -122.303780516,
"latitude": 47.5937110552,
"type": "Point",
"coordinates": [-122.303780516, 47.5937110552]
}
},
"guests_can_invite_others": true,
"start_date": "2017-05-01T18:00:00-07:00",
"total_accepted": 34,
"description": "The May Day Antifascist March 2017 will begin at Judkins Park in Seattle at 6pm. See you there! #Antifa",
"title": "May Day Antifascist March (2017)",
"name": "May Day Antifascist March (2017)",
"origin_system": "Facebook",
"featured_image_url": "http://res.cloudinary.com/hqrdtqlz0/image/upload/facebook:1174341002623136",
"modified_date": "2017-05-02T11:33:20.537Z",
"created_date": "2017-05-02T11:33:20.537Z",
"identifiers": ["facebook:1218606431616456"]
}, {
As it happens, the front end code for displaying the dates depends on the dates being formatted with the UTC format.
At the risk of sounding like I'm "passing the buck" - is there a way to force all of the dates to come back in UTC format? I ask because detecting this on the front while preventing the time from getting converted to the user's local timezone can be a bit messy, so if it's somewhat easy for you guys, that would probably be ideal. :)
Added issue for API here:
https://github.com/ResistanceCalendar/resistance-calendar-api/issues/73
@dorono maybe you can help clarify this a bit...What's the reason we can't we use the same method we are using to display event start/end times for the list view?
Thanks for the issue @dorono. Mongo already stores data in UTC format, but the issue was I was not serializing the timezone properly so rending would not work.
The issue should now be fixed and deployed, but waiting on the next ETL run to finalize and update the datastore.
https://github.com/ResistanceCalendar/resistance-calendar-api/issues/73
Event Start/End times are displaying correctly on the list view currently, just need to correct for time zones on the event details pages.