[wp-trac] [WordPress Trac] #62400: RSS Block showing date in UTC when pubDate in feed is not
WordPress Trac
noreply at wordpress.org
Mon Mar 17 09:46:29 UTC 2025
#62400: RSS Block showing date in UTC when pubDate in feed is not
-------------------------------------------------+-------------------------
Reporter: kaitohm | Owner: pbearne
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.8
Component: Date/Time | Version: 6.7
Severity: normal | Resolution:
Keywords: has-testing-info gutenberg-merge | Focuses: tests
has-patch needs-testing |
-------------------------------------------------+-------------------------
Changes (by saurabh.dhariwal):
* focuses: => tests
Comment:
Test Case: Incorrect Date Display in RSS Block When Site Timezone is
Changed
Title: Verify if RSS block displays the correct date when the site
timezone is changed from UTC+0 to UTC+9
Test Type: Functional, Regression
Environment:
WordPress Version: 6.7.2
Theme: Default
Plugins: None (Test with a clean setup)
PHP Version: 8.1
Debug Mode: Enabled (define('WP_DEBUG', true); define('WP_DEBUG_LOG',
true); define('WP_DEBUG_DISPLAY', false);)
Preconditions:
WordPress is installed and running.
Site timezone is initially set to UTC+0 under Settings > General >
Timezone.
No caching plugin or custom time-related code is active.
Test Steps:
Navigate to Settings > General in the WordPress admin panel.
Change the Timezone to UTC+9 (Tokyo, JST) and save changes.
Create or edit an existing post and add an RSS Block.
In the RSS Block settings, enter an RSS feed URL where pubDate is not
in GMT/UTC.
Example:
https://www.mixonline.jp/DesktopModules/MixOnline_Rss/MixOnlinerss.aspx?rssmode=3
This feed contains <pubDate> with a +0900 offset.
Enable the Display Date option in the block settings.
Publish the post and view it on the frontend.
Observe the displayed date in both:
Block Editor Preview
Published Post View
Compare the displayed date with the expected local time conversion
based on the site’s timezone.
Expected Result:
The date should be correctly converted and displayed based on the
site's timezone (UTC+9).
Example: If the feed contains <pubDate>Wed, 13 Nov 2024 04:52:00
+0900</pubDate>, it should display as November 13, 2024.
Actual Result:
[FAIL] The RSS block still shows the date in UTC instead of the site's
local timezone.
Example: It incorrectly displays November 12, 2024 instead of
November 13, 2024.
[PASS] If the date is correctly shown in the site's timezone.
Post-Test Actions:
Check the RSS Block source code for time conversion logic.
Test with different timezones (e.g., UTC-5, UTC+5:30) to confirm if
the issue is global.
Report the bug to WordPress Core or Gutenberg development team if
confirmed.
Possible Workaround: Manually convert the time using a custom
shortcode or plugin.
Additional Notes:
If using a caching plugin, clear cache and recheck.
Try using different RSS feeds to see if the issue persists.
Screenshot : when UTC 0 : https://prnt.sc/8PfPxql9jYGy
Screenshot: change to UTC 9 : https://prnt.sc/M_UN8StQ_NxI
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62400#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list