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'


Top ↑

Return Return

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


Top ↑

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 ) );
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.2.6 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.