BSD and GNU implementations of the date command are slightly incompatible.
The GNU implementation can take an arbitrary date with the -d option, and
the format is automatically detected, but on BSD implementations it must
be invoked like for setting the system date but using the -j option to
avoid that step, and the input format must be provided with the -f option.
Since the -j option isn't supported by the GNU implementation, it can be
exploited to detect which variant the system uses.
BSD and GNU implementations of the date command are slightly incompatible.
The GNU implementation can take an arbitrary date with the -d option, and the format is automatically detected, but on BSD implementations it must be invoked like for setting the system date but using the -j option to avoid that step, and the input format must be provided with the -f option.
Since the -j option isn't supported by the GNU implementation, it can be exploited to detect which variant the system uses.
Closes: https://github.com/mvertes/txt2man/issues/19
Signed-off-by: Ismael Luceno ismael@iodev.co.uk