• Resolved dakotag

    (@dakotag)


    Hi,

    My RSS feed comes in as UTC time. I need it to show in UTC-6, is there a way to do this (changing the default WordPress time zone does not work)

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author vaakash

    (@vaakash)

    Hi @dakotag,

    Thanks for using Super RSS Reader. Right now there is no option to set timezone. It displays the UTC time.

    Can you please go to plugin editor and select the file includes/feed.php under super RSS reader?

    Then go to line no. 173
    https://plugins.trac.www.ads-software.com/browser/super-rss-reader/trunk/includes/feed.php#L173

    Replace line
    $date = date_i18n( $date_format, $item->get_date( 'U' ) );

    with this

    $date = date_i18n( $date_format, $item->get_date( 'U' ) * (-6*60) );

    Save the file.

    Let me know if this worked for me. Since the code is changed, when you upgrade the plugin the change will be overwritten.

    Thanks,
    Aakash

    Thread Starter dakotag

    (@dakotag)

    Thanks for the quick reply! I’ve added the code that you suggested, but it seems to be adjusting other date/time parameters as well. I specifically am using it to display previously played songs on a radio station. ( https://jaredr19.sg-host.com/view-playlist/ )

    It seems to have altered the month, hours, and minutes. Ideally I’d like to just adjust the hour back 6 hours, and no other parts of the date. Is that possible?

    Plugin Author vaakash

    (@vaakash)

    Hi @dakotag,

    Sorry for the delay.

    I was wrong with the numbers. It should be (-6*60*60)

    Please let me know if that works.

    Thanks,
    Aakash

    Plugin Author vaakash

    (@vaakash)

    Hi @dakotag,

    I tested the code locally.
    Below is the correct change.

    $date = date_i18n( $date_format, $item->get_date( 'U' ) - (6*60*60) );

    Also, I’m thinking of adding an option to the plugin.
    I’ll let you know when it is available in the future version.

    Thanks,
    Aakash

    Thread Starter dakotag

    (@dakotag)

    That solved it! Thank you so much! I feel like adding the option to adjust time zone would be an amazing addition to your plugin, and help you have extra feautes that other plugins don’t have. Thanks again for all your help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change Time Zone’ is closed to new replies.