Some locales use a comma to separate a decimal whole from its fractional
part, so allow either a decimal stop or a decimal comma.
return grent->gr_gid;
}
+// Parse a time, specified as a decimal number of seconds (with optional fractional component after decimal
+// point or decimal comma).
static void parse_timespec(const std::string ¶mval, const std::string &servicename,
const char * paramname, timespec &ts)
{
decltype(len) i;
for (i = 0; i < len; i++) {
char ch = paramval[i];
- if (ch == '.') {
+ if (ch == '.' || ch == ',') {
i++;
break;
}