MinGW-w64: Replace incompatible format for strftime()

Replace %F and %T in the format string. These specifiers are just
short-hand so just write them in full.
This commit is contained in:
João Valverde 2021-07-17 14:48:03 +01:00
parent c4265865c2
commit 8d59f81729
1 changed files with 2 additions and 1 deletions

View File

@ -1365,7 +1365,8 @@ ek_write_field_value(field_info *fi, write_json_data* pdata)
tm = gmtime_r(&t->secs, &tm_time);
#endif
if (tm != NULL) {
strftime(time_string, sizeof(time_string), "%FT%T", tm);
/* Some platforms (MinGW-w64) do not support %F or %T. */
strftime(time_string, sizeof(time_string), "%Y-%m-%dT%H:%M:%S", tm);
json_dumper_value_anyf(pdata->dumper, "\"%s.%09uZ\"", time_string, t->nsecs);
} else {
json_dumper_value_anyf(pdata->dumper, "\"Not representable\"");