mosquitto_sub will quit with an error on Windows if %U is used.

Seconds since the Unix epoch is not a parameter that can be obtained
with strftime on Windows.

Closes #1908. Thanks to Danil intl.
pull/1811/head
Roger A. Light 5 years ago
parent 22227f6015
commit d429c54130

@ -9,6 +9,10 @@ Broker:
Client library:
- Fix build on Mac Big Sur. Closes #1905.
Clients:
- mosquitto_sub will now quit with an error if the %U option is used on
Windows, rather than just quitting. Closes #1908.
1.6.12 - 2020-08-19
===================

@ -77,6 +77,10 @@ static int check_format(const char *str)
// JSON output, assuming JSON payload
}else if(str[i+1] == 'U'){
// Unix time+nanoseconds
#ifdef WIN32
fprintf(stderr, "Error: The %%U format option is not supported on Windows.\n");
return 1;
#endif
}else if(str[i+1] == 'x' || str[i+1] == 'X'){
// payload in hex
}else{

Loading…
Cancel
Save