[Interest] Question about setting QLocale

Murphy, Sean smurphy at walbro.com
Tue Dec 1 19:05:55 CET 2015


> > Once I make that change, I only have to deal with existing files that
> > were recorded under the old format where the date portion was done as
> > "ddd MM/dd/yyyy". For those, it's really only the "ddd" part that is
> > locale dependent and is screwing me up. That is redundant data anyways
> > since I have the day, month, and year data right after it. So the
> > easiest fix is to read in the string, remove the first 4 characters
> > (the "ddd " portion) and then use QDateTime::fromString(data,
> > "MM/dd/yyyy HH:mm:ss.zzz") to read those in.
> 
> Instead of "the first 4 characters", you should say "all the characters before the
> first space". As you saw with the Chinese case, names of the days of the week
> do not have to be 3 characters long.

Agreed! Thanks for the correction, I would have hit that one pretty early on in testing, but I might as well do it correctly the first time I recompile...

Sean



More information about the Interest mailing list