Bug#785118: coreutils: date : format %p %P do not work properly

2015-05-17 Thread Keld Simonsen
On Tue, May 12, 2015 at 07:55:40PM +0300, Marko Myllynen wrote:
 Hi,
 
 [CC'ing Keld with whom this issue was discussed some years ago]
 
 On 2015-05-12 18:49, Pádraig Brady wrote:
  On 12/05/15 16:40, Pádraig Brady wrote:
  On 12/05/15 14:51, Michael Stone wrote:
  On Tue, May 12, 2015 at 03:36:17PM +0200, op...@mumm.ac.be wrote:
  I'm just upgrading my server from debian 7 (wheezy) to debian 8 (jessie) 
  and several of my scripts are not working anymore. After some tests, it 
  turns out that the problem likely comes from the fact the 'date' 
  function does not work as expected.
 
  In wheezy, the command line
  date /bin/date +%Y%m%d.%p
  would have returned
  20150512.PM
 
  In jessie, the same command line returns
  20150512.
  omitting PM.
 
  As a consequence of this omission, my scripts are crashing.
 
  Have you got any idea why this is happening?
 
  I can't reproduce it:
 
  /bin/date +%Y%m%d.%p
  20150512.AM
 
  If I had to guess, I'd say it's a locale issue. What does 
  env LANG=C LC_ALL=C /bin/date +%Y%m%d.%p
  return?
 
  If that works, what does 
  locale
  return when run by itself?
 
  %p is blank in many locales unfortunately.
  You can see the am_pm vary with these commands:
 
  $ LC_ALL=en_IE locale -k LC_TIME
  $ LC_TIME=C locale -k LC_TIME
  $ LC_ALL=zh_CN.utf8 date +%p
  ??
  $ LC_ALL=en_US.utf8 date +%p
  PM
  $ LC_ALL=en_US date +%p
  PM
 
  locales with blank am_pm should be fixed up to allow one to
  get an explicit 12 hour format like `date +%I:%m%p` for example.
 
  Note some locales (like en_GB for example) default
  to 24 hour (t_fmt=%T), and also provide an am_pm entry,
  which is the correct behavior in my opinion.
  
  I see that https://sourceware.org/glibc/wiki/Locales states:
  am_pm and t_fmt_ampm - should be empty if using 24 hour time
  
  Marko, that seems incorrect?
  At least am_pm should be populated to
  allow users to generate 12 hour time with strftime?
 
 I can't find references to the discussion I had with Keld earlier but
 the rationale for not populating it was along the lines:
 
 1) am_pm should be populated only if AM/PM convention is used to signal
 applications they should not try to print them when using them is
 unwanted. Seems that only the locale(5) commit messages, not the page
 itself, spell this out:
 
 http://git.kernel.org/cgit/docs/man-pages/man-pages.git/commit/?id=b5d4168adfb426f45108ac2bf7c8b17b126b07a1
 http://git.kernel.org/cgit/docs/man-pages/man-pages.git/commit/?id=0c2dbad182e40db2ca47128f229ca7dbd83e179f
 
 2) what unwanted means is that in many cases 12 hour time with AM/PM
 notation is alien thus generating such time representation under those
 locales would be illogical (e.g. 5.34 ip. in Finnish context is
 completely unnatural).
 
 The same goes for various name_* keywords in LC_NAME, defining them for
 locales where they are not used would not allow signaling applications
 that under those locales their usage is unwanted.

I think that when running scripts you should ensure that the correct
locale is used, and in most cases that would be the C locale.
Better set it explicitely.

Best regards
keld


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#555168: [Traduc] Bug#555168: Unclear license situation for (e)glibc locales provided by you

2012-07-13 Thread Keld Simonsen
I hereby grant all my locales to be licensed under GPL v2.

Best regards
Keld Simonsen

On Thu, Jun 14, 2012 at 02:29:23PM +0200, Jean-Philippe Guérard wrote:
 Le Mer 13 juin 2012 06:53, Christian PERRIER a écrit :
  Quoting Helge Kreutzmann (deb...@helgefjell.de):
  Hello,
  you are listed as contact person/author of the following locale: fr_FR
  I think Keld Simonsen's name is mentioned as the locale was based on one
 he wrote.
  tra...@traduc.org is a collective address (see
  http://traduc.org). Adding the internal organisational list to the CC
 field so that representatives of the traduc.org can give a stance in
 name of the organization.
  PS: coucou, traduc.org..:-)...Bon, en gros, vous avez sûrement compris
 mais c'est vrai qu'il y a une action en cours actuellement, dans Debian,
 pour clarifier la licence des locales où celle-ci n'est pas claire. Je
 n'ai évidemment aucun doute sur les intentions de
  traduc.org par rapport à la locale fr_FR (utiliser une licence libre),
 mais il faut que quelqu'un confirme cela, évidemment.
  Ce serait quand même un peu ballot que Debian retire la locale
  française de la libc. Je serais largement au chomage..:-)
 
 The fr_FR was taken over by traduc.org in March 2008, and the update of
 this file have been discussed on the traduc mail list from
 January to March 2008 (http://listes.traduc.org/pipermail/traduc/).
 
 At that time, the license was not discussed, as we were under the
 impression this file was part of the glibc and distributed under the same
 license.
 
 The original author of this file is Keld Jørn Simonsen.
 
 Provided that Keld Jørn Simonsen agree with this, we would be very happy
 to see this file officially put under a Free license. Using the same
 license as the glibc would be fine for us.
 
 Hope that helps.
 
 Best Regards.
 
 -- 
 Jean-Philippe Guérard
 http://tigreraye.org
 



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org