wsutil: Also add the "Z" suffix to UTC times with precision 0

Set num_bytes to zero if we don't copy the fractional part.

Fixup e3106b896fda0c034f4635bdcfc35c11307d9e44
This commit is contained in:
John Thacker 2025-05-13 21:33:49 -04:00
parent 2544a1251b
commit ddbb43ca96

View File

@ -1000,6 +1000,7 @@ format_nstime_as_iso8601(char *buf, size_t buflen, const nstime_t *ns,
ptr += num_bytes;
remaining -= num_bytes;
num_bytes = 0;
if (precision != 0) {
/*
* Append the fractional part.