Easy Tutorial
❮ Func Filesystem Readlink Func String Strcmp ❯

PHP date_time_set() Function

PHP Date/Time Reference Manual

Example

Set the time:


Definition and Usage

The date_time_set() function is used to set the time.

Syntax

Parameter Description
object Required. Specifies a DateTime object returned by date_create()
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. FALSE on failure.
PHP Version: 5.2+
--- ---
Changelog: PHP 5.3.0: Return value changed from NULL to DateTime.
--- ---

❮ Func Filesystem Readlink Func String Strcmp ❯