Time difference between Discourse and WP

AI-generated summary

A user, tyeeoutdoor, reports that Discourse topics displayed on WordPress via the WP-Discourse-Shortcodes plugin show incorrect timestamps (1970/01/01). simon, the plugin developer, identifies the issue as a time format problem and updates the plugin on GitHub here. The update resolves the timestamp issue, and tyeeoutdoor confirms it works perfectly. Simon also notes that recent changes to Discourse’s Groups routes have broken the discourse_groups shortcode, which he plans to fix in a future update. He advises users to click the Update button on posts or pages with the discourse_topics shortcode to refresh cached content.

I have a new install of Discourse. It is giving the correct time stamps to the posts.

I also WP-discourse-shortcodes to grab a list of topics for my WP pages. But when the discourse topics show up on WP, they all have the timestamp of 1970/01/01.

I’m not sure why it is doing that or how to fix it. I have a webhook enables for the “latest” shortcode.

Any thoughts on this would be appreciated!

It has to do with the time format that is being returned from your server. I can fix that this weekend. I’ll let you know when the plugin has been updated.

Oh wow thanks! I love having this feature for my membership so I really appreciate you keeping up this plugin.

The plugin has been updated. You can download it from GitHub here: GitHub - communiteq/wp-discourse-shortcodes: Extends the wp-discourse plugin by adding shortcodes that can be used to link to the Discourse forum. · GitHub. The update should fix the problem with the dates all displaying as 1970/01/01. Let me know if it doesn’t.

Recent changes to the Discourse Groups routes have broken the discourse_groups shortcode for sites that are on the latest version of Discourse. The fix for that is fairly simple. I’ll update the plugin again later this weekend.

Edit: the plugin caches the HTML that it creates from the Discourse content. You can get fresh content by clicking the Update button on any post or page that has a discourse_topics shortcode on it.

Works perfectly! Thanks for such a quick update.