toUtcDateTime method

DateTime toUtcDateTime()

Returns a DateTime object in the UTC time zone based on this Instant.

Implementation

DateTime toUtcDateTime() {
  final utcInstant = toUtc();
  return DateTime.utc(
    utcInstant.year,
    utcInstant.month,
    utcInstant.day,
    utcInstant.hour,
    utcInstant.minute,
    utcInstant.second,
  );
}