Month heading on archives with Date cloud template

Posted in: Newspaper
Post count: 2

Hi,

I am wondering if this is a bug in the td-cloud-library plugin, or if there is a setting to change this.

When accessing a monthly date archive (e.g. /2022/02), the correct posts show up, and the page <title> tag shows the correct month (February). However, the heading shows the previous month (example screenshot).

I think this is because wp-content/plugins/td-cloud-library/state/date/tdb_state_date.php first gets a timestamp for 12:00am February 1 in the UTC±00:00 timezone. Then wp_date() on this line

$this->current_month = ucfirst( wp_date( 'F', $timestamp ) );

uses the timezone set in the WP settings, which for us is several hours prior. This then makes the month name show up as January. To fix it, I added one line and changed the above line like this:


$zone = new DateTimeZone('UTC');
$this->current_month = ucfirst( wp_date( 'F', $timestamp, $zone) );

But we’d rather not change the plugin code. Is there a way to change the month name without doing this, or is this a bug that can be addressed?

Thanks!

Post count: 21065

Hello @fcgllc!

We will investigate this case.

Thank you for letting us know about this situation!

Post count: 2

We are having this issue as well. Looking forward to a solution.

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.