I'm guessing this is for timestamps (strftime) so boost::format won't work...
geez, that's a thoroughly stupid way of handling an invalid time string - crashing the application...I vote for bigmuscles solution =) specially since it will do the right thing if the format string is bad - set errno and return 0.
I'm guessing this is for timestamps (strftime) so boost::format won't work...
geez, that's a thoroughly stupid way of handling an invalid time string - crashing the application...I vote for bigmuscles solution =) specially since it will do the right thing if the format string is bad - set errno and return 0.