PHP 教程
設(shè)置時(shí)間:
date_time_set() 函數(shù)用于設(shè)置時(shí)間。
參數(shù) | 描述 |
---|---|
object | 必需。規(guī)定一個(gè)由 date_create() 返回的 DateTime 對(duì)象。 |
hour | 必需。規(guī)定時(shí)間中的小時(shí)。 |
minute | 必需。規(guī)定時(shí)間中的分。 |
second | 可選。規(guī)定時(shí)間中的秒。默認(rèn)為 0。 |
返回值: | 如果成功則返回 DateTime 對(duì)象。如果失敗則返回 FALSE。 |
---|---|
PHP 版本: | 5.2+ |
更新日志: | PHP 5.3.0:返回值從 NULL 變?yōu)?DateTime。 |