Bug 1555189

Summary: glibc: The Japanese Era name will be changed on May 1, 2019 [rhel-7.7.0]
Product: Red Hat Enterprise Linux 7 Reporter: Yoko Oguma <yoguma>
Component: glibcAssignee: Florian Weimer <fweimer>
Status: CLOSED ERRATA QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact: Vladimír Slávik <vslavik>
Priority: high    
Version: 7.7CC: ahogbin, andrew.schofield, ashankar, bbarve, bgollahe, chorn, codonell, cww, dj, eng-i18n-bugs, fweimer, kkohata, mcermak, mfabian, mmatsuya, mnewsome, nyamashi, ompnix, petersen, pfrankli, psatpute, skolosov, toneata, vslavik
Target Milestone: rcKeywords: i18n, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glibc-2.17-289.el7 Doc Type: Enhancement
Doc Text:
.Date formatting updates for the Japanese Reiwa era The GNU C Library now provides correct Japanese era name formatting for the Reiwa era starting on May 1st, 2019. The time handling API data has been updated, including the data used by the `strftime` and `strptime` functions. All APIs will correctly print the Reiwa era including when `strftime` is used along with one of the era conversion specifiers such as `%EC`, `%EY`, or `%Ey`.
Story Points: ---
Clone Of:
: 1555930 1555932 1577438 1693147 1693148 1693151 1693152 1695514 (view as bug list) Environment:
Last Closed: 2019-08-06 12:48:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1594286, 1654309, 1660844, 1688569, 1693147, 1693148, 1693151, 1693152, 1695514    

Description Yoko Oguma 2018-03-14 06:14:53 UTC
Description of problem:

We've opened this ticket for a new glibc package since the Japanese era name will be changed on May 1, 2019. According to the Japanese government, they are considering preliminary announcement around the spring/summer of 2018.

Checked the following thing:

@yoguma src]$ ldd `which date`
	linux-vdso.so.1 =>  (0x00007ffedfffb000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f11d5915000)
	/lib64/ld-linux-x86-64.so.2 (0x0000563a810a4000)

@yoguma src]$ LC_TIME=ja_JP.utf8 ltrace date +'%EY'
__libc_start_main(0x401ac0, 2, 0x7fffdea3ea58, 0x4096f0 <unfinished ...>
strrchr("date", '/')                             = nil
setlocale(LC_ALL, "")                            = "LC_CTYPE=en_US.utf8;LC_NUMERIC=e"...
bindtextdomain("coreutils", "/usr/share/locale") = "/usr/share/locale"
textdomain("coreutils")                          = "coreutils"
__cxa_atexit(0x402c50, 0, 0, 0x736c6974756572)   = 0
getopt_long(2, 0x7fffdea3ea58, "d:f:I::r:Rs:u", 0x60d2a0, nil) = -1
clock_gettime(0, 0x7fffdea3e890, 2, 0)           = 0
localtime(0x7fffdea3e810)                        = 0x7f93fc125d40
strftime(" \345\271\263\346\210\22030\345\271\264", 1024, " %EY", 0x7f93fc125d40) = 12
fwrite("\345\271\263\346\210\22030\345\271\264", 11, 1, 0x7f93fc121400) = 1
__overflow(0x7f93fc121400, 10, 11, 1024平成30年
)         = 10
exit(0 <unfinished ...>
__fpending(0x7f93fc121400, 0, 64, 0x7f93fc121eb0) = 0
fileno(0x7f93fc121400)                           = 1
__freading(0x7f93fc121400, 0, 64, 0x7f93fc121eb0) = 0
__freading(0x7f93fc121400, 0, 2052, 0x7f93fc121eb0) = 0
fflush(0x7f93fc121400)                           = 0
fclose(0x7f93fc121400)                           = 0
__fpending(0x7f93fc1211c0, 0, 0x7f93fc122a00, 0xfbad000c) = 0
fileno(0x7f93fc1211c0)                           = 2
__freading(0x7f93fc1211c0, 0, 0x7f93fc122a00, 0xfbad000c) = 0
__freading(0x7f93fc1211c0, 0, 4, 0xfbad000c)     = 0
fflush(0x7f93fc1211c0)                           = 0
fclose(0x7f93fc1211c0)                           = 0
+++ exited (status 0) +++

@yoguma src]$ find glibc-2.17-c758a686 | grep ja
glibc-2.17-c758a686/po/ja.po
glibc-2.17-c758a686/localedata/locales/ja_JP 

Look at glibc-2.17-c758a686/localedata/locales/ja_JP: 

    era     "+:2:1990/01/01:+*:平成:%EC%Ey年";/
            "+:1:1989/01/08:1989/12/31:平成:%EC元年";/
            "+:2:1927/01/01:1989/01/07:昭和:%EC%Ey年";/
            "+:1:1926/12/25:1926/12/31:昭和:%EC元年";/
            "+:2:1913/01/01:1926/12/24:大正:%EC%Ey年";/
            "+:2:1912/07/30:1912/12/31:大正:%EC元年";/
            "+:6:1873/01/01:1912/07/29:明治:%EC%Ey年";/
            "+:1:0001/01/01:1872/12/31:西暦:%EC%Ey年";/
            "+:1:-0001/12/31:-*:紀元前:%EC%Ey年"

Version-Release number of selected component (if applicable):
glibc-2.17-196.el7_4.2

Additional information:
https://en.wikipedia.org/wiki/Japanese_imperial_transition,_2019

Comment 5 Carlos O'Donell 2018-03-14 21:23:06 UTC
Fix for this has to come from upstream first so we have the correct and matching era name.

Comment 11 Christian Horn 2019-02-12 06:27:44 UTC
Once we have released an errata including the new errata data, will there be anything left for customers to do?

For example, could there any relinking be required, or any recompilation of code which they use?

Comment 12 Carlos O'Donell 2019-02-12 17:21:52 UTC
(In reply to Christian Horn from comment #11)
> Once we have released an errata including the new errata data, will there be
> anything left for customers to do?

No.

In fact we can write a kbentry *immediately* with steps to take to actually adjust the target system to handle the new era change.

The steps require compiling and installing a new locale.
 
> For example, could there any relinking be required, or any recompilation of
> code which they use?

No.

Comment 13 Christian Horn 2019-02-13 04:17:44 UTC
>(In reply to Christian Horn from comment #11)
>> Once we have released an errata including the new errata data, will there be
>> anything left for customers to do?
>No.
Thanks Carlos, should now be covered by https://access.redhat.com/solutions/2749651 .

FWIW, openjdk seems to have implemented the new era now, with name NEWERA, which they
intend to replace then later.  I guess they wanted to be sure to have time to debug
issues they might have with the change itself now that there is time, and later just
want to replace the era.
http://hg.openjdk.java.net/jdk/jdk/rev/2e3f73b616c2
https://bugs.openjdk.java.net/browse/JDK-8202088
https://bugs.openjdk.java.net/browse/JDK-8205432

Comment 24 Sergey Kolosov 2019-04-18 17:53:48 UTC
Verified,
glibc-2.17-289.el7 has new Japanese Era support

Comment 26 errata-xmlrpc 2019-08-06 12:48:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:2118