first method

ZonedDateTime first()

Returns a ZonedDateTime which maps to the original LocalDateTime in the mapped DateTimeZone: either the single result if the mapping is unambiguous, or the earlier result if the local date/time occurs twice in the time zone due to a time zone offset change such as an autumnal daylight saving transition.

SkippedTimeException: The local date/time was skipped in the time zone. Returns: The unambiguous result of mapping a local date/time in a time zone.

Implementation

ZonedDateTime first() {
  switch (count) {
    case 0:
      throw SkippedTimeError(localDateTime, zone);
    case 1:
    case 2:
      return _buildZonedDateTime(earlyInterval);
    default:
      throw StateError("Can't happen");
  }
}