atOffset method

  1. @override
OffsetDateTime atOffset([
  1. ZoneOffset? offset
])

Converts this to an OffsetDateTime with the given offset.

If unspecified, offset defaults to the offset for defaultZoneId.

Implementation

@override
OffsetDateTime atOffset([ZoneOffset? offset]) =>
    OffsetDateTime.fromLocalDateTime(toLocal(), offset);