Метод toUtc
DateTime toUtc(Возвращает значение этого DateTime в часовом поясе UTC.
Возвращает this если оно уже в UTC. В противном случае этот метод эквивалентен:
new DateTime.fromMicrosecondsSinceEpoch(microsecondsSinceEpoch,
isUtc: true)
Исходный код
DateTime toUtc() {
if (isUtc) return this;
return new DateTime._withValue(_value, isUtc: true);
}
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-core/DateTime/toUtc.html