PHP » GoLang |
login |
register |
about
|
GoLang DateTime::setTime
request it (449)
GoLang replacement for PHP's DateTime::setTime
[edit | history]
DateTime::setTimedate_time_set(PHP 5 >= 5.2.0, PHP 7) DateTime::setTime -- date_time_set — Sets the time DescriptionObject oriented style
public DateTime DateTime::setTime
( int
$hour
, int $minute
[, int $second = 0
[, int $microseconds = 0
]] )Procedural style
DateTime date_time_set
( DateTime
$object
, int $hour
, int $minute
[, int $second = 0
[, int $microseconds = 0
]] )Resets the current time of the DateTime object to a different time. Parameters
Return Values
Returns the DateTime object for method chaining or Changelog
ExamplesExample #1 DateTime::setTime() example Object oriented style
<?php Procedural style
<?php The above examples will output something similar to: 2001-01-01 14:55:00 2001-01-01 14:55:24 Example #2 Values exceeding ranges are added to their parent values
<?php The above example will output: 2001-01-01 14:55:24 2001-01-01 14:56:05 2001-01-01 15:05:24 2001-01-02 01:55:24 See Also
|
more
Recently updated
more
Most requested
more
Last requests
|