toIso8601TimeString method

String toIso8601TimeString()

Returns an ISO-8601 full-precision extended format representation.

The format is HH:mm:ss.mmmuuuZ for UTC time, and HH:mm:ss.mmmuuu (no trailing "Z") for local/non-UTC time, where:

  • HH are hours in the range 00 to 23,
  • mm are minutes in the range 00 to 59,
  • ss are seconds in the range 00 to 59 (no leap seconds),
  • mmm are milliseconds in the range 000 to 999, and
  • uuu are microseconds in the range 001 to 999. If microsecond equals 0, then this part is omitted.

Implementation

String toIso8601TimeString() => toIso8601String().split("T").last;