bp_core_current_time( bool $gmt = true, string $type = 'mysql' )

Get the current GMT time to save into the DB.

Description

Parameters

$gmt

(bool) (Optional) True to use GMT (rather than local) time. Default: true.

Default value: true

$type

(string) (Optional) See the 'type' parameter in current_time(). Default: 'mysql'.

Default value: 'mysql'

Return

(string) Current time in 'Y-m-d h:i:s' format.

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 BuddyPress 1.2.6
	 *
	 * @param string $value Current GMT time.
	 */
	return apply_filters( 'bp_core_current_time', current_time( $type, $gmt ) );
}

Changelog

Changelog
Version Description
BuddyPress 1.2.6 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.