toUtc method
Returns a new instance of Jiffy with the same date and time in UTC time zone.
If the current Jiffy instance is in local time zone, the date and time will be converted to UTC time zone. Otherwise, the current instance will be returned as is.
Implementation
Jiffy toUtc() {
final dateTime = Query.isUtc(this.dateTime)
? this.dateTime
: _manipulator.toUtc(this.dateTime);
return _clone(dateTime);
}