timeZoneFormatted method

String timeZoneFormatted([
  1. bool seperateWithColon = true
])

Implementation

String timeZoneFormatted([bool seperateWithColon = true]) {
  final int hours = timeZoneOffset.inMinutes ~/ 60;
  final int minutes = timeZoneOffset.inMinutes - (hours * 60);

  return (timeZoneOffset.isNegative ? "-" : "+") +
      hours.toString() +
      (seperateWithColon ? ":" : "") +
      minutes.toString();
}