bbp_convert_date( $time, string $d = 'U', bool $translate = false )

Convert time supplied from database query into specified date format.

Description

Parameters

$post

(int|object) (Optional) Default is global post object. A post_id or post object

$d

(string) (Optional) Default is 'U'. Either 'G', 'U', or php date format

Default value: 'U'

$translate

(bool) (Optional) Default is false. Whether to translate the result

Default value: false

Return

(string) Returns timestamp

Source

File: bp-forums/common/functions.php

function bbp_convert_date( $time, $d = 'U', $translate = false ) {
	$time = mysql2date( $d, $time, $translate );

	return apply_filters( 'bbp_convert_date', $time, $d, $translate );
}

Changelog

Changelog
Version Description
bbPress (r2455) 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.