• Resolved oichinokata

    (@oichinokata)


    Dear Themeisle and Codeinwp,

    I’d like to display RSS feed time and date in local time.
    I know the time and date must be in UTC, so this plugin displays the date and time in UTC also.

    WordPress Feeds ? WordPress Codex
    https://codex.www.ads-software.com/WordPress_Feeds#RSS_feed_time_and_date_format

    I’ve been successes to display the RSS feed time and date in local time by small changing as follows.

    --- feedzy-rss-feeds-3.0.5/includes/abstract/feedzy-rss-feeds-admin-abstract.ph2017-01-13 12:23:42.000000000 +0900
    +++ feedzy-rss-feeds/includes/abstract/feedzy-rss-feeds-admin-abstract.php	2017-01-26 22:39:48.000000000 +0900
    @@ -551,9 +551,9 @@
     			}
     
     			if ( $metaArgs['date'] ) {
    -				$contentMeta .= __( 'on', 'feedzy-rss-feeds' ) . ' ' . date_i18n( $metaArgs['date_format'], $item->get_date( 'U' ) );
    +				$contentMeta .= __( 'on', 'feedzy-rss-feeds' ) . ' ' . date_i18n( $metaArgs['date_format'], $item->get_date( 'U' ) + get_option( 'gmt_offset' ) * 3600 );
     				$contentMeta .= ' ';
    -				$contentMeta .= __( 'at', 'feedzy-rss-feeds' ) . ' ' . date_i18n( $metaArgs['time_format'], $item->get_date( 'U' ) );
    +				$contentMeta .= __( 'at', 'feedzy-rss-feeds' ) . ' ' . date_i18n( $metaArgs['time_format'], $item->get_date( 'U' ) + get_option( 'gmt_offset' ) * 3600 );
     			}
     		}
     		$contentMeta = apply_filters( 'feedzy_meta_output', $contentMeta, $feedURL );
    

    It is very kind for visitors.

    If possible, could you apply this patch code in the next update?

    Kind Regards,
    Oichinokata

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘To display RSS feed time and date in Local Time (including patch code)’ is closed to new replies.