pulibrary / researchdata

Drupal 10 site for Princeton Research Data Service
GNU General Public License v2.0
0 stars 0 forks source link

Trainings from Libcal Display Wrong Scheduled Time #244

Open kevinreiss opened 1 year ago

kevinreiss commented 1 year ago

Notes

Brought via RSS importer configured here: https://github.com/pulibrary/researchdata/blob/e65418f06de053ee305d1ce738fc2cc501b421f5/sites/default/config/migrate_plus.migration.event_rss_importer.yml#L5

Steps to recreate

Visit https://researchdata.princeton.edu/events-and-training You will see entries display values that four hours prior to their actual start time.

Visit individual page entries https://researchdata.princeton.edu/trainings/2023-05-02/data-stewardship-series-data-publishing

You will see the correct time display in the page body under "date" but the incorrect time displayed at the top under "date and time".

Screenshot 2023-08-01 at 4 44 03 PM
kevinreiss commented 1 year ago

For existing entries we need to change the data. It imported incorrectly. We have now active events in the feed to try and debug the import at the moment https://libcal.princeton.edu/rss.php?m=cat&iid=771&cid=12260&cat=49413.

I can see nothing in the config or display values about why it should have been stored incorrectly, I'd like to add a test event to libcal and see if it still imports correctly.

kevinreiss commented 1 year ago

I did a test import with the general libcal events feed to pull in some real data and discovered that the homepage event display view was using UTC rather than local time. Steps to do my test.

  1. Update the URL in sites/default/config/migrate_plus.migration.event_rss_importer.yml to the general libcal RSS value https://libcal.princeton.edu/rss.php?cid=12260&m=month
  2. Run the update manually lando drush migrate:import -y event_rss_importer

I thin updated the event view configuration in the linked pull request. I had to update a few time values in old events manually in production as they were out of sync.

VickieKarasic commented 1 year ago

I met with Sarah Reiff-Connell in PRDS and we talked through several issues:

It would be great if we could take a look at this next week @kevinreiss.

kevinreiss commented 12 months ago

Even though the importer references New York/Eastern as the time zone for incoming date/time data it still seems to be thinking this data is in UTC time.

kevinreiss commented 11 months ago

@VickieKarasic I think the last issue are out of scope for the PRDS drupal system. Any other system could pull our guides feeds. The last issue I see on the website looks to be formatted correctly. I did not manually correct it and the node itself has no edits in Drupal so maybe this is fixed? Alas I misread it. It's just that this event is late enough in the day for the incorrect time to seem reasonable....

If there is another specific feed that has been identified that they want to pull in this can be done. Please open up a new ticket with the specific details. We can make it into the same content type if that is appropriate.

VickieKarasic commented 11 months ago

@kevinreiss I see what you mean about that event on 10/24, so looks like we still need to look into the UTC issue.

Agreed about breaking out those other points about RSS feeds into new issues as they arise, so I think we are all set on that front with this ticket.

kevinreiss commented 11 months ago

@VickieKarasic and I looked again at this issue. The config importer https://github.com/pulibrary/researchdata/blob/main/sites/default/config/migrate_plus.migration.event_rss_importer.yml is configured to treat the dates as America/New_York which is how libguides provides them. Drupal is treating the date values as UTC values and converting them to Eastern time. Things we tried.

Neither had any impact. Possible next times.

VickieKarasic commented 11 months ago

Heard back from Springshare and they did not find any evidence that LibCal Events RSS feed was ever configured to deliver times in UTC. Confirmed that the LibCal RSS feed only pulls in the date/time once (see image - tested by pulling the feed into a LibGuide block), and that Drupal seems to be pulling in the additional date and converting to UTC.

RSSLibGuideView

VickieKarasic commented 11 months ago

@kevinreiss Some information I found that might be useful:

kevinreiss commented 7 months ago

Tried this suggestion to set both the "from" and "to" timezones https://github.com/pulibrary/researchdata/pull/272 but this also did not work.....