inUtc method

ZonedDateTime inUtc()

Returns the mapping of this local date/time within DateTimeZone.utc.

As UTC is a fixed time zone, there is no chance that this local date/time is ambiguous or skipped.

Returns: The result of mapping this local date/time in UTC.

Implementation

ZonedDateTime inUtc() =>
// Use the internal constructors to avoid validation. We know it will be fine.
IZonedDateTime.trusted(IOffsetDateTime.fullTrust(this, Offset.zero), DateTimeZone.utc);