Changeset 6995

Show
Ignore:
Timestamp:
02/23/08 22:11:47 (9 months ago)
Author:
westi
Message:

Fix the display of human time difference when server timezone if different from blog timezone. Fixes #5970 props jhodgdon.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/edit-attachment-rows.php

    r6988 r6995  
    6666            $t_time = get_the_time(__('Y/m/d g:i:s A')); 
    6767            $m_time = $post->post_date; 
    68             $time = get_post_time(); 
     68            $time = get_post_time( 'G', true ); 
    6969            if ( ( abs($t_diff = time() - $time) ) < 86400 ) { 
    7070                if ( $t_diff < 0 ) 
  • trunk/wp-admin/edit-post-rows.php

    r6980 r6995  
    4545                $t_time = get_the_modified_time(__('Y/m/d g:i:s A')); 
    4646                $m_time = $post->post_modified; 
    47                 $time = get_post_modified_time(); 
     47                $time = get_post_modified_time('G', true); 
    4848            } else { 
    4949                $t_time = get_the_time(__('Y/m/d g:i:s A')); 
    5050                $m_time = $post->post_date; 
    51                 $time = get_post_time(); 
     51                $time = get_post_time('G', true); 
    5252            } 
    5353            if ( ( abs(time() - $time) ) < 86400 ) { 
  • trunk/wp-admin/includes/template.php

    r6993 r6995  
    380380                $t_time = get_the_modified_time(__('Y/m/d g:i:s A')); 
    381381                $m_time = $page->post_modified; 
    382                 $time = get_post_modified_time(); 
     382                $time = get_post_modified_time('G', true); 
    383383            } else { 
    384384                $t_time = get_the_time(__('Y/m/d g:i:s A')); 
    385385                $m_time = $page->post_date; 
    386                 $time = get_post_time(); 
     386                $time = get_post_time('G', true); 
    387387            } 
    388388            if ( ( abs(time() - $time) ) < 86400 ) { 
  • trunk/wp-includes/functions.php

    r6984 r6995  
    66    if ( empty( $m ) ) 
    77        return false; 
     8         
     9    if( 'G' == $dateformatstring ) { 
     10        return gmmktime( 
     11            (int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ), 
     12            (int) substr( $m, 5, 2 ), (int) substr( $m, 8, 2 ), (int) substr( $m, 0, 4 ) 
     13        ); 
     14    } 
     15     
    816    $i = mktime( 
    917        (int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ),