Changeset 8676 for trunk/src/bp-core/bp-core-functions.php
- Timestamp:
- 07/23/2014 06:07:39 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/bp-core-functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-functions.php
r8579 r8676 772 772 * 773 773 * @param bool $gmt True to use GMT (rather than local) time. Default: true. 774 * @param string $type See the 'type' parameter in {@link current_time()}. 775 Default: 'mysql'. 774 776 * @return string Current time in 'Y-m-d h:i:s' format. 775 777 */ 776 function bp_core_current_time( $gmt = true ) {777 // Get current time in MYSQL format778 $current_time = current_time( 'mysql', $gmt );778 function bp_core_current_time( $gmt = true, $type = 'mysql' ) { 779 // Get current time 780 $current_time = current_time( $type, $gmt ); 779 781 780 782 return apply_filters( 'bp_core_current_time', $current_time ); … … 841 843 * work out time elapsed between two known dates. 842 844 */ 843 $newer_date = ( !$newer_date ) ? strtotime( bp_core_current_time()) : $newer_date;845 $newer_date = ( !$newer_date ) ? bp_core_current_time( true, 'timestamp' ) : $newer_date; 844 846 845 847 // Difference in seconds
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)