Changeset 10244
- Timestamp:
- 09/10/2020 12:21:24 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-events.php
r9854 r10244 332 332 foreach ( $wordcamp as $field => $value ) { 333 333 switch ( $field ) { 334 // This is the local time, not a true Unix timestamp. 334 335 case 'Start Date (YYYY-mm-dd)': 335 336 $value = absint( $value ); … … 344 345 break; 345 346 347 // This is the local time, not a true Unix timestamp. 346 348 case 'End Date (YYYY-mm-dd)': 347 349 $event['end_timestamp'] = absint( $value ); … … 392 394 if ( $event['start_timestamp'] && empty( $event['end_timestamp'] ) ) { 393 395 $event['end_timestamp'] = $event['start_timestamp']; 396 } 397 398 if ( $wordcamp->{'Event Timezone'} && $event['start_timestamp'] ) { 399 $wordcamp_timezone = new DateTimeZone( $wordcamp->{'Event Timezone'} ); 400 401 $wordcamp_datetime = new DateTime( 402 '@' . $event['start_timestamp'], 403 $wordcamp_timezone 404 ); 405 406 $event['utc_offset'] = $wordcamp_timezone->getOffset( $wordcamp_datetime ); 394 407 } 395 408 … … 569 582 } 570 583 584 /* 585 * Convert to local time, because the `date_utc` column in `wporg_events` is misnomed and actually 586 * expects the _local_ time. 587 */ 571 588 $start_timestamp = ( $meetup['time'] / 1000 ) + ( $meetup['utc_offset'] / 1000 ); // convert to seconds 572 589 $latitude = ! empty( $meetup['venue']['lat'] ) ? $meetup['venue']['lat'] : $meetup['group']['lat'];
Note: See TracChangeset
for help on using the changeset viewer.