[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] [doc-en] master: Update now instead of null in the example for DateTimeImmutable::__constr
From: Anantajit JG via GitHub <noreply () php ! net>
Date: 2022-11-16 15:21:00
Message-ID: pOGgQ74TMpBF6C9Zo2cCUByDGTS48XRkE0uJ18RZU () main ! php ! net
[Download RAW message or body]
Author: Anantajit JG (anantajitjg)
Committer: GitHub (web-flow)
Pusher: cmb69
Date: 2022-11-16T16:10:18+01:00
Commit: https://github.com/php/doc-en/commit/a09cd538fce5047cb8d9a484ef92611f70b0437f
Raw diff: https://github.com/php/doc-en/commit/a09cd538fce5047cb8d9a484ef92611f70b0437f.diff
Update now instead of null in the example for DateTimeImmutable::__construct
Closes GH-2014.
Changed paths:
M reference/datetime/datetimeimmutable/construct.xml
Diff:
diff --git a/reference/datetime/datetimeimmutable/construct.xml \
b/reference/datetime/datetimeimmutable/construct.xml index 231aebcd704..1ac0f28b30e \
100644
--- a/reference/datetime/datetimeimmutable/construct.xml
+++ b/reference/datetime/datetimeimmutable/construct.xml
@@ -164,7 +164,7 @@ $date = new DateTimeImmutable();
echo $date->format('Y-m-d H:i:sP') . "\n";
// Current date/time in the specified time zone.
-$date = new DateTimeImmutable(null, new DateTimeZone('Pacific/Nauru'));
+$date = new DateTimeImmutable('now', new DateTimeZone('Pacific/Nauru'));
echo $date->format('Y-m-d H:i:sP') . "\n";
// Using a UNIX timestamp. Notice the result is in the UTC time zone.
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic