Skip to content

Commit

Permalink
Fix constructor bug (#1180)
Browse files Browse the repository at this point in the history
  • Loading branch information
gitstashgithub authored and kylekatarnls committed Mar 10, 2018
1 parent ef12cbd commit 14aef4c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Carbon/Carbon.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,10 @@ public function __construct($time = null, $tz = null)
$timezone = static::safeCreateDateTimeZone($tz);
// @codeCoverageIgnoreStart
if ($isNow && !isset($testInstance) && (
version_compare(PHP_VERSION, '7.1.0-dev', '<')
) ||
version_compare(PHP_VERSION, '7.1.3-dev', '>=') && version_compare(PHP_VERSION, '7.1.4-dev', '<')
version_compare(PHP_VERSION, '7.1.0-dev', '<')
||
version_compare(PHP_VERSION, '7.1.3-dev', '>=') && version_compare(PHP_VERSION, '7.1.4-dev', '<')
)
) {
$dateTime = new DateTime('now', $timezone);
$microTime = str_pad(strval(microtime(true) * 1000000 % 1000000), 6, '0', STR_PAD_LEFT);
Expand Down

0 comments on commit 14aef4c

Please sign in to comment.