toUnUtc method
Treats DateTime, which is not defined as UTC due to parsing, as UTC and converts it to local time.
パースの関係でUTCとして定義されていないDateTimeをUTCとして扱いローカルタイムに変換します。
Implementation
DateTime toUnUtc() {
return DateTime.tryParse("${toIso8601String().trimStringRight("Z")}Z")!
.toLocal();
}