Function __global->_get_timezoned_date_time
Definitions
sources/temporal.php
- Get a nice formatted date/time from the specified Unix timestamp.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $include_time | boolean | No | No | required parameter | N/A | N/A | Whether to include the time in the output |
| $timestamp | TIME | No | No | required parameter | N/A | N/A | Input timestamp |
| $use_contextual_dates | boolean | No | No | required parameter | N/A | N/A | Whether contextual dates will be used |
| $utc_time | boolean | No | No | required parameter | N/A | N/A | Whether to work in UTC time (false: $timestamp is in UTC) |
| $member_id | ?MEMBER | No | No | required parameter | N/A | N/A | Member for which the date is being rendered (null: current member). Use $GLOBALS['FORUM_DRIVER']->get_guest_id() for server times |
Returns
- Formatted time
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get a nice formatted date/time from the specified Unix timestamp.
*
* @param boolean $include_time Whether to include the time in the output
* @param TIME $timestamp Input timestamp
* @param boolean $use_contextual_dates Whether contextual dates will be used
* @param boolean $utc_time Whether to work in UTC time (false: $timestamp is in UTC)
* @param ?MEMBER $member_id Member for which the date is being rendered (null: current member). Use $GLOBALS['FORUM_DRIVER']->get_guest_id() for server times
* @return string Formatted time
*/
function _get_timezoned_date_time(bool $include_time, int $timestamp, bool $use_contextual_dates, bool $utc_time, ?int $member_id) : string
* Get a nice formatted date/time from the specified Unix timestamp.
*
* @param boolean $include_time Whether to include the time in the output
* @param TIME $timestamp Input timestamp
* @param boolean $use_contextual_dates Whether contextual dates will be used
* @param boolean $utc_time Whether to work in UTC time (false: $timestamp is in UTC)
* @param ?MEMBER $member_id Member for which the date is being rendered (null: current member). Use $GLOBALS['FORUM_DRIVER']->get_guest_id() for server times
* @return string Formatted time
*/
function _get_timezoned_date_time(bool $include_time, int $timestamp, bool $use_contextual_dates, bool $utc_time, ?int $member_id) : string

