Skip to content

Commit

Permalink
Ignore optional DTEND on ical import (#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
albig authored May 24, 2024
1 parent 832d1ba commit d6ff4ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/icalimport.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function sunflower_icalimport( $url = false, $auto_categories = false ) {

// Write start and end time to event post metadata.
update_post_meta( $id, '_sunflower_event_from', $event->DTSTART->getDateTime( $timezone_fix )->setTimezone( $timezone )->format( 'Y-m-d H:i' ) ); // phpcs:ignore
update_post_meta( $id, '_sunflower_event_until', $event->DTEND->getDateTime( $timezone_fix )->setTimezone( $timezone )->format( 'Y-m-d H:i' ) ); // phpcs:ignore
update_post_meta( $id, '_sunflower_event_until', $event->DTEND?->getDateTime( $timezone_fix )->setTimezone( $timezone )->format( 'Y-m-d H:i' ) ); // phpcs:ignore
update_post_meta( $id, '_sunflower_event_uid', $uid );

if ( isset( $event->LOCATION ) ) { // phpcs:ignore
Expand Down

0 comments on commit d6ff4ab

Please sign in to comment.