Function __global->cal_utctime_to_usertime

Definitions

sources/calendar.php

  • Put a timestamp into the correct timezone for being reported onto the calendar.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$timestamp TIME No No required parameter N/A N/A Timestamp (either UTC, if $show_in_users_timezone is true, or converted to the timezone of the event if $show_in_users_timezone is false)
$show_in_users_timezone boolean No No required parameter N/A N/A Whether the time should be converted to the viewer's own timezone instead (if so $timestamp must be in UTC)

Returns

  • Altered timestamp
  • Type: TIME
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Put a timestamp into the correct timezone for being reported onto the calendar.
 *
 * @param  TIME $timestamp Timestamp (either UTC, if $show_in_users_timezone is true, or converted to the timezone of the event if $show_in_users_timezone is false)
 * @param  boolean $show_in_users_timezone Whether the time should be converted to the viewer's own timezone instead (if so $timestamp must be in UTC)
 * @return TIME Altered timestamp
 */

function cal_utctime_to_usertime(int $timestamp, bool $show_in_users_timezone) : int