toISO8601

fun LocalDateTime.toISO8601(): String

Formats this LocalDateTime as an ISO-8601 string with a trailing Z, dropping any fractional-seconds component (e.g. 2024-03-15T08:30:45.123 becomes "2024-03-15T08:30:45Z").

The Z labels the value as UTC; no zone conversion is performed. Extension function on LocalDateTime.

Return

the ISO-8601 string