TimezonedString extension

on

Methods

toTzString(bool inUtc, [int? numChars]) String

Available on DateTime, provided by the TimezonedString extension

Converts this date-time to a string in either local or UTC time zone. If numChars is provided, the string will be truncated to that length. Note that is inUtc is true, 'z' will be appended to the string regardless of numChars.