Make WordPress Core

Ticket #57742: 57742.diff

File 57742.diff, 1.2 KB (added by sakibmd, 20 months ago)

I have also checked @nazmulhudadev's PR and it's working great.

  • src/wp-admin/includes/class-wp-posts-list-table.php

    diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php
    index 06f8836c76..02fae6ed25 100644
    a b class WP_Posts_List_Table extends WP_List_Table { 
    11591159        public function column_date( $post ) {
    11601160                global $mode;
    11611161
    1162                 if ( '0000-00-00 00:00:00' === $post->post_date ) {
     1162                if ( '0000-00-00 00:00:00' === $post->post_date_gmt ) {
    11631163                        $t_time    = __( 'Unpublished' );
    11641164                        $time_diff = 0;
    11651165                } else {
    class WP_Posts_List_Table extends WP_List_Table { 
    11671167                                /* translators: 1: Post date, 2: Post time. */
    11681168                                __( '%1$s at %2$s' ),
    11691169                                /* translators: Post date format. See https://www.php.net/manual/datetime.format.php */
    1170                                 get_the_time( __( 'Y/m/d' ), $post ),
     1170                                wp_date( __( 'Y/m/d' ), get_post_time( 'U', true ) ),
    11711171                                /* translators: Post time format. See https://www.php.net/manual/datetime.format.php */
    1172                                 get_the_time( __( 'g:i a' ), $post )
     1172                                wp_date( __( 'g:i a' ), get_post_time( 'U', true ) )
    11731173                        );
    11741174
    11751175                        $time      = get_post_timestamp( $post );