diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c index d0b90fa74096..ba27f1e14420 100644 --- a/lib/libzfs/libzfs_dataset.c +++ b/lib/libzfs/libzfs_dataset.c @@ -3010,7 +3010,12 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen, if (literal || localtime_r(&time, &t) == NULL || - strftime(propbuf, proplen, "%a %b %e %k:%M:%S %Y", + strftime(propbuf, proplen, +#ifdef _WIN32 + "%a %b %e %H:%M:%S %Y", +#else + "%a %b %e %k:%M:%S %Y", +#endif &t) == 0) (void) snprintf(propbuf, proplen, "%llu", (u_longlong_t)val);