LibreCat / Catmandu-Fix-Date

Catmandu fixes for processing dates
https://metacpan.org/pod/Catmandu::Fix::Date
0 stars 0 forks source link

install fails on several Linux systems #2

Closed jorol closed 8 years ago

jorol commented 8 years ago

Install fails on several Linux systems, see http://matrix.cpantesters.org/?dist=Catmandu-Fix-Date+0.0124

Error message:

t/00-load.t .................. ok
Invalid locale code or name: en-EN
t/01-datetime_format.t ....... 
Dubious, test returned 255 (wstat 65280, 0xff00)
nicolasfranck commented 8 years ago

Thanks for reporting this. I'll look into it. Seems like some linux distributions do not have enough localization information.

jorol commented 8 years ago

Is 'en_EN' a valid code or should it be something like 'en_GB' or 'en_US'?

$ locale -a
...
en_AG
en_AU
en_AU.utf8
en_BW
en_BW.utf8
en_CA
en_CA.utf8
en_DK
en_DK.iso885915
en_DK.utf8
en_GB
en_GB.iso885915
en_GB.utf8
en_HK
en_HK.utf8
en_IE
en_IE@euro
en_IE.utf8
en_IN
en_NG
en_NZ
en_NZ.utf8
en_PH
en_PH.utf8
en_SG
en_SG.utf8
en_US
en_US.iso885915
en_US.utf8
en_ZA
en_ZA.utf8
en_ZM
en_ZW
en_ZW.utf8
...

See https://github.com/LibreCat/Catmandu-Fix-Date/blob/master/lib/Catmandu/Fix/datetime_format.pm#L30 & https://github.com/LibreCat/Catmandu-Fix-Date/blob/master/lib/Catmandu/Fix/datetime_format.pm#L46

nicolasfranck commented 8 years ago

You're right. I don't see it listed on my system either. No idea where I got this from. EN isn't a country code ;-) Something deprecated that used to work in the past? Anyway I see reports on the internet about the same mistake.

The default for datetime is now UTC, so make en_GB the default locale?

jorol commented 8 years ago

OK

nics commented 8 years ago

isn't en_US a more sensible choice?

nicolasfranck commented 8 years ago

Better?

http://matrix.cpantesters.org/?dist=Catmandu-Fix-Date+0.0126

jorol commented 8 years ago

Perfect! Thanks.