Re: 12-hour vs. 24-hour clock format

2022-02-23 Thread Christian Groessler

On 2/23/22 17:58, Laura Smith wrote:



a lot of peole don't do 24 hour clocks well.


For almost everyone outside North America, 24 hour clocks is the *only* thing 
they do. A bit like the weird American affection for m/d/y.  ;-)



Here in Germany, Bavaria at least, most people are using 12h 
colloquially, 24h clocks only in "offical" talking and writing.


regards,
chris



Re: 12-hour vs. 24-hour clock format

2022-02-23 Thread Theo de Raadt
So you want this command to behave differently in different environments?
Who wants that unpredicabtility?  I suspect noone wants that.

Your reference to POSIX is irrelevant because "w" is not a POSIX command.

Furthermore that feature creep in POSIX locales is not done by most
programs which do 24-hour clock by default, meaning it cannot force them
do 12-hour clock when requested, so the proposal feels like a one-way
road.

Anyways, it is like you didn't read my reply, I was saying: I don't
think we want to do your proposal.

Svyatoslav Mishyn  wrote:

> (Wed, 23 Feb 09:13) Theo de Raadt:
> > We do not have a firm rule that all programs must use 24-hour clock,
> > and I don't think we should create such a rule either.
> 
> OK, how about then before printing a date to check T_FMT_AMPM[0]?
> But if it were added to all code where approriate, then it would change
> standard behavior to some programs which currently display in 24-hour 
> format...
> so again no. 
> 
> As like in DragonflyBSD/FreeBSD:
> https://gitweb.dragonflybsd.org/dragonfly.git/blob/022bb0a9ed6967bc18e421ed074f5727e49314e0:/usr.bin/w/w.c#l133
> https://cgit.freebsd.org/src/tree/usr.bin/w/w.c?h=2d3725d62acbaca2fe84d43e8fd32ae9fb9a915b#n151
> 
> [0]: 
> https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/basedefs/V1_chap07.html
> 



Re: 12-hour vs. 24-hour clock format

2022-02-23 Thread Theo de Raadt
Svyatoslav Mishyn  wrote:

> just wondering why are some programs using 12-hour/24-hour clock format
> by default?
> 
> For instance, 12-hour clock format:
> w(1)/uptime(1) 
> Should it be fixed?

We do not have a firm rule that all programs must use 24-hour clock,
and I don't think we should create such a rule either.



Re: 12-hour vs. 24-hour clock format

2022-02-22 Thread Nick Holland

On 2/22/22 3:02 PM, Svyatoslav Mishyn wrote:

Hi,

just wondering why are some programs using 12-hour/24-hour clock format
by default?

For instance, 12-hour clock format:
w(1)/uptime(1)
Should it be fixed?

24-hour clock format:
date(1)
ls(1)
stat(1)
systat(1)
top(1)


Well...  keep in mind, if this were "fixed", it would break a lot of
existing scripts.  I see a lot of pain here.

HOWEVER, if OpenBSD is out in left field here, compared to say, Solaris 9,
other BSDs ... maybe it should be fixed (you will note a suspicious absence
in my list.  I really don't care what an OS that sorts AaBbCc rather than
ABCabc does, that ain't unix).

As for the "why"...
There is a certain logic to the current list.  "w" and "uptime" are often
run by humans and having a more "human friendly" display isn't bad since a
lot of peole don't do 24 hour clocks well.  The others are often run as
part of scripts.  As someone who does a lot of scripting, inconsistency
between apps is not a problem for me.  Changing the output format is a
really big problem.

Nick.