forum_time

Description

Returns the current time with offsets.

Syntax

int forum_time ([bool $use_user_offset[, int $timestamp]])



Parameter $use_user_offset

Expected type: Boolean
Description: Whether or not to apply the user's time offset in addition to the overall forum time offset (default is true)



Parameter $timestamp

Expected type: Integer
Description: The timestamp to use. If not specified, uses the current timestamp (returned by the PHP time() function)



Return value

Expected type: Integer
Description: The Unix timestamp for the current time with time offsets applied


Notes

  • Always applies the offset in the time_offset setting.
  • If use_user_offset is true, applies the user's offset as well.
  • Returns seconds since the unix epoch (January 1st, 1970 00:00:00 UTC - see Wikipedia for a much more detailed explanation)
Advertisement: