WordPress.org

Make WordPress Core

Ticket #12885: 12885.diff

File 12885.diff, 1.1 KB (added by kawauso, 3 years ago)

Patch #12885 and #5842 with get_date_from_gmt()

  • livejournal-importer.php

     
    384384                if ( 18 == strlen( $post_date ) ) 
    385385                        $post_date = substr( $post_date, 0, 10 ) . ' ' . substr( $post_date, 10 ); 
    386386 
     387                // Adjust date from GMT to local time 
     388                $post_date = get_date_from_gmt( $post_date ); 
     389 
    387390                // Cleaning up and linking the title 
    388391                $post_title = isset( $post['subject'] ) ? trim( $post['subject'] ) : ''; 
    389392                $post_title = $this->translate_lj_user( $post_title ); // Translate it, but then we'll strip the link 
     
    631634                preg_match( '|<date>(.*)</date>|i', $comment, $matches ); 
    632635                $comment_date = trim( str_replace( array( 'T', 'Z' ), ' ', $matches[1] ) ); 
    633636 
     637                // Adjust date from GMT to local time 
     638                $comment_date = get_date_from_gmt( $comment_date ); 
     639 
    634640                // Grab IP if available 
    635641                preg_match( '|<property name=\'poster_ip\'>(.*)</property>|i', $comment, $matches ); // optional 
    636642                $comment_author_IP = isset( $matches[1] ) ? $matches[1] : '';