array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.unixtojd.php', 1 => 'unixtojd', ), 'up' => array ( 0 => 'ref.calendar.php', 1 => 'Calendar 函数', ), 'prev' => array ( 0 => 'function.juliantojd.php', 1 => 'juliantojd', ), 'next' => array ( 0 => 'book.datetime.php', 1 => '日期/时间', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'zh', 'path' => 'reference/calendar/functions/unixtojd.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
unixtojd — 将 Unix 时间戳转换为儒略日数
根据指定的 Unix timestamp
(自 1970 年 1 月 1 日以来的秒数)返回儒略日数。如果没有指定时间戳则返回当前日期的儒略日数。
无论哪种方式,时间都被视为当地时间(不是 UTC)。
timestamp
用于转换的 unix 时间戳。
int 类型的儒略日数, 或者在失败时返回 false
。
版本 | 说明 |
---|---|
8.0.0 |
timestamp 现在可以为 null。
|