toDateTimeUtc method

DateTime toDateTimeUtc()

Constructs a DateTime from this ZonedDateTime which has a DateTime.isUtc set to true and represents the same instant of time as this value rather than the same local time.

If the date and time is not on a millisecond (Web) or microsecond (VM) boundary (the unit of granularity of DateTime) the value will be truncated towards the start of time.

A DateTime representation of this value with a 'universal' kind, with the same instant of time as this value.

Implementation

DateTime toDateTimeUtc() => toInstant().toDateTimeUtc();