Skip to:
Content

BuddyPress.org

Changeset 1785


Ignore:
Timestamp:
09/03/2009 10:50:19 PM (15 years ago)
Author:
apeatling
Message:

Forcing all time comparisons in BuddyPress to be converted to GMT. Fixes #808

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r1784 r1785  
    10771077    array( 1, __( 'second', 'buddypress' ), __( 'seconds', 'buddypress' ) )
    10781078    );
     1079   
     1080    $older_date = strtotime( gmdate( 'Y-m-d H:i:s', $older_date ) );
    10791081
    10801082    /* $newer_date will equal false if we want to know the time elapsed between a date and the current time */
    10811083    /* $newer_date will have a value if we want to work out time elapsed between two known dates */
    1082     $newer_date = ( !$newer_date ) ? ( time() + ( 60*60*0 ) ) : $newer_date;
    1083 
     1084    $newer_date = ( !$newer_date ) ? ( strtotime( gmdate( 'Y-m-d H:i:s' ) ) + ( 60*60*0 ) ) : $newer_date;
     1085   
    10841086    /* Difference in seconds */
    10851087    $since = $newer_date - $older_date;
Note: See TracChangeset for help on using the changeset viewer.