Make WordPress Core

Ticket #56378: Add-Date-56378.patch

File Add-Date-56378.patch, 1.1 KB (added by sebastienserre, 4 years ago)
  • wp-admin/includes/class-wp-debug-data.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    diff --git a/wp-admin/includes/class-wp-debug-data.php b/wp-admin/includes/class-wp-debug-data.php
    a b  
    835835                        );
    836836                }
    837837
     838                // Server time
     839                $date = new \DateTime("now", new \DateTimeZone("UTC"));
     840                $info['wp-server']['fields']['current'] = array(
     841                        'label' => __( 'Current date' ),
     842                        'value' => $date->format(\DateTime::ATOM),
     843                );
     844                $info['wp-server']['fields']['utc-time'] = array(
     845                        'label' => __( 'Current UTC time' ),
     846                        'value' => $date->format(\DateTime::RFC850),
     847                );
     848
     849                $info['wp-server']['fields']['server-time'] = array(
     850                        'label' => __( 'Current Server time' ),
     851                        'value' => wp_date( 'c', $_SERVER['REQUEST_TIME'] ),
     852                );
     853
    838854                // Populate the database debug fields.
    839855                if ( is_resource( $wpdb->dbh ) ) {
    840856                        // Old mysql extension.