Glossary Term
current_time()
current_time() — Retrieves the current time based on specified type. The ‘mysql’ type will return the time in the format for MySQL DATETIME field. The ‘timestamp’ or ‘U’ types will return the current timestamp or a sum of timestamp and timezone offset, depending on $gmt. Other strings will be interpreted as PHP date formats (e.g. ‘Y-m-d’). If $gmt is a truthy value then both types will use GMT time, otherwise the output is adjusted with the GMT offset for the site.
Inputs: $type (string): Type of time to retrieve. Accepts ‘mysql’, ‘timestamp’, ‘U’, or PHP date format string (e.g. ‘Y-m-d’). $gmt (bool): Optional. Whether to use GMT timezone. Default false.
Returns int|string: Integer if $type is ‘timestamp’ or ‘U’, string otherwise.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
