Changeset 2451 for trunk/bp-core.php
- Timestamp:
- 01/25/2010 03:58:46 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r2440 r2451 1365 1365 ); 1366 1366 1367 if ( !is_numeric( $older_date ) ) 1368 $older_date = strtotime( $older_date . ' GMT' ); 1367 if ( !is_numeric( $older_date ) ) { 1368 $time_chunks = explode( ':', str_replace( ' ', ':', $older_date ) ); 1369 $date_chunks = explode( '-', str_replace( ' ', '-', $older_date ) ); 1370 1371 $older_date = gmmktime( (int)$time_chunks[1], (int)$time_chunks[2], (int)$time_chunks[3], (int)$date_chunks[1], (int)$date_chunks[2], (int)$date_chunks[0] ); 1372 } 1369 1373 1370 1374 /* $newer_date will equal false if we want to know the time elapsed between a date and the current time */ 1371 1375 /* $newer_date will have a value if we want to work out time elapsed between two known dates */ 1372 $newer_date = ( !$newer_date ) ? gmmktime( ) : $newer_date;1376 $newer_date = ( !$newer_date ) ? gmmktime( gmdate( 'H' ), gmdate( 'i' ), gmdate( 's' ), gmdate( 'n' ), gmdate( 'j' ), gmdate( 'Y' ) ) : $newer_date; 1373 1377 1374 1378 /* Difference in seconds */
Note: See TracChangeset
for help on using the changeset viewer.