Skip to content

Commit

Permalink
Simplify ZonedDateTime::ofInstant()
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Mar 14, 2018
1 parent 7ab2cc3 commit a1bbefa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ZonedDateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public static function ofInstant(Instant $instant, TimeZone $timeZone) : ZonedDa
if ($timeZone instanceof TimeZoneOffset) {
$timeZoneOffset = $timeZone;
} else {
$timeZoneOffset = TimeZoneOffset::ofTotalSeconds($dateTimeZone->getOffset($dateTime));
$timeZoneOffset = TimeZoneOffset::ofTotalSeconds($dateTime->getOffset());
}

return new ZonedDateTime($localDateTime, $timeZoneOffset, $timeZone, $instant);
Expand Down

0 comments on commit a1bbefa

Please sign in to comment.