nowAsIso8601 top-level property
String
get
nowAsIso8601
Gets the current UTC date and time as an ISO 8601 string.
This is a convenience getter that returns the current UTC time in ISO 8601 format with the 'Z' suffix indicating UTC.
Note: you can mock the current time by setting the nowKey in the Zone to a valid Now function that returns a UTC DateTime.
Example:
final currentTimeString = nowAsIso8601; // "2024-03-20T14:30:00.000Z"
Implementation
String get nowAsIso8601 => now.toIso8601String();