首页 WordPress函数大全 current_time()

current_time()

2020-05-01 / 3204阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

current_time( string $type, int|bool $gmt )

Retrieves the current time based>

Contents

  • Description
    • Parameters
    • Return
    • Source
    • Changelog
  • Related
    • Uses
    • Used By
  • User Contributed Notes

描述

The ‘mysql’ type will return the time in the format for MySQL DATETIME field. The ‘timestamp’ type will return the current timestamp or a sum of timestamp and timezone offset, depending>

参数

$type

(string)
(Required)
Type of time to retrieve. Accepts 'mysql', 'timestamp', or PHP date format string (e.g. 'Y-m-d').

$gmt

(int|bool)
(Optional)
Whether to use GMT timezone. Default false.

返回

(int|string) Integer if $type is 'timestamp', string otherwise.

大家谈论
    我的见解