PHP date_time_set() Function
PHP Date/Time Reference Manual
Example
Set the time:
Run Example »
Definition and Usage
The date_time_set() function sets the time.
Syntax
date_time_set(
object,hour,minute,second);
| Parameters | Description |
|---|---|
| object | Required. Specifies a DateTime object returned by date_create() DateTime object returned by |
| hour | Required. Specifies the hour of the time. |
| minute | Required. Specifies the minute of the time. |
| second | Optional. Specifies the second of the time. Default is 0. |
Technical Details
| Return Value: | Returns a DateTime object on success, or FALSE on failure. |
|---|---|
| PHP Version: | 5.2+ |
| Changelog: | PHP 5.3.0: The return value changed from NULL to DateTime. |
PHP Date/Time Reference Manual