[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Default date output format changed after an upgrade to buster



On Wednesday, September 11, 2019 09:14:19 AM Greg Wooledge wrote:
> On Wed, Sep 11, 2019 at 09:07:10AM -0400, rhkramer@gmail.com wrote:
> > On Wednesday, September 11, 2019 07:57:37 AM Michael Stone wrote:
> > > those strings are expected to change depending on
> > > things like locale settings, and are for humans to read, not programs.
> > 
> > Interesting!  I have no argument with what you say, it makes perfect
> > sense, but it must be one of those things that "goes without saying" --
> > I can't claim to be a Linux guru, but in the years I've spent with Linux
> > and with a fair amount of reading, I never saw that stated, nor was it
> > ever implied enough for me to infer that (nor did I ever have occasion
> > to run into a problem because of it (I am not the OP).)
> 
> https://mywiki.wooledge.org/locale
> https://wiki.debian.org/Locale
> 
> If you're writing a program that parses the output of a command, you
> typically will need to set LANG or LC_ALL to C somewhere in your
> program, in order to get output in a predictable format.

That's the sentence that would have been most meaningful / useful to me, and I 
would have needed to find that in all (or at least many of) the sources of 
documentation on how to write scripts or programs.  (Now, sometimes I have 
selective attention, maybe it is there and I just glossed over it...)

I'd need something to make me think there was a reason to look at locale when 
writing a script or program.

(The only reason I found (that I can recall) to set a locale was to get a sort 
order that met my needs (usually meaning one that sorted uppercase and 
lowercase words and letters in a common sort order (not separated, uppercase 
in one place, lowercase in another).  (Hmm, I vaguely recally that I once had 
to change the locale for some other reason, but that reason escapes me atm.)


Reply to: