Making WordPress.org


Ignore:
Timestamp:
08/04/2023 07:24:58 AM (18 months ago)
Author:
dd32
Message:

Support Forums: When generating the localised forums freshness time, respect the timezone of the site when converting.

The freshness is based on the timezone of the site, not GMT.

H/t PressKopp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php

    r12801 r12810  
    12841284        }
    12851285
    1286         // This is for translating the date components.
    1287         $datetime = date_create_immutable_from_format( 'Y-m-d H:i:s', $last_active );
     1286        // This is for translating the date components. $last_active is based on non-gmt fields, so the timezone must be passed.
     1287        $datetime = date_create_immutable_from_format( 'Y-m-d H:i:s', $last_active, wp_timezone() );
    12881288        if ( ! $datetime ) {
    12891289            return $anchor;
Note: See TracChangeset for help on using the changeset viewer.