bp_core_current_time( bool $gmt = true, string $type = 'mysql' )
Get the current GMT time to save into the DB.
Description Description
Parameters Parameters
- $gmt
-
(Optional) True to use GMT (rather than local) time. Default: true.
Default value: true
- $type
-
(Optional) See the 'type' parameter in current_time(). Default: 'mysql'.
Default value: 'mysql'
Return Return
(string) Current time in 'Y-m-d h:i:s' format.
Source Source
File: bp-core/bp-core-functions.php
function bp_core_current_time( $gmt = true, $type = 'mysql' ) { /** * Filters the current GMT time to save into the DB. * * @since 1.2.6 * * @param string $value Current GMT time. */ return apply_filters( 'bp_core_current_time', current_time( $type, $gmt ) ); }
Changelog Changelog
Version | Description |
---|---|
1.2.6 | Introduced. |