formatTimestampForUTC function
- DateTime dateTime
Format a DateTime object to a string in UTC format.
dateTime - DateTime object
Returns a string in the format of yyyy-MM-ddTHH:mm:ss.SSS'Z'.
Implementation
String formatTimestampForUTC(DateTime dateTime) {
return DateFormat('yyyy-MM-ddTHH:mm:ss.SSS\'Z\'').format(dateTime.toUtc());
}