Bug 1169339

Summary: libicudata contains outdated timezone info
Product: Red Hat Enterprise Linux 7 Reporter: Anton <trianman>
Component: icuAssignee: Mike FABIAN <mfabian>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: bbarve, jorton, mfabian, pfrankli, psatpute, qe-i18n-bugs, tpelka, trianman
Target Milestone: rcKeywords: i18n
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 11:43:01 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: 1549949    

Description Anton 2014-12-01 11:44:38 UTC
Description of problem:
I use php-intl module which depends on libicudata.so
But libicudata.so has wery wery wery outdated timezone info, so any datetime functions form php-intl produces wrong output.

So could you rebuild the libicu package when the tzdata package is updated.


Version-Release number of selected component (if applicable):
libicu-50.1.2-11.el7.x86_64

How reproducible:
Everytime.

Steps to Reproduce:
1. Install php-intl
2. Update tzdata package
3. Run script:

<?php

$dateIn = '27.10.2014';
$tz = 'Europe/Moscow';
date_default_timezone_set($tz);
$intlDateFormatter = new \IntlDateFormatter('ru_RU', 2, -1, $tz, 1, 'dd.MM.yyyy');
$timestamp = $intlDateFormatter->parse($dateIn);

var_dump($intlDateFormatter->format($timestamp));
var_dump(date('d.m.Y', $timestamp));
?>

Actual results:
string(16) "27.10.2014"
string(16) "26.10.2014"

Expected results:
string(16) "27.10.2014"
string(16) "27.10.2014"

Additional info:

Comment 2 Joe Orton 2014-12-01 12:10:38 UTC
If this issue is critical or in any way time sensitive, please raise a ticket
through your regular Red Hat support channels to make certain it receives the
proper attention and prioritization to assure a timely resolution.

Comment 3 Eike Rathke 2014-12-02 11:33:19 UTC
Need to figure out if the internal ICU timezone data actually can be updated without upgrading ICU.

However, I'm not even sure that the date decrement is due to outdated timezone data.

@Anton:
Could you verify that the specific date in that timezone given the procedure actually produces the desired result in environments that use a newer ICU?

Comment 4 Anton 2014-12-02 12:43:22 UTC
@Eike:
I'll do.
For my mind, we can rebuild the current version of ICU with a new tzdata.

I'll try to rebuild the current version of ICU. If it will not help I'll try to build an updated version.

Comment 5 Anton 2014-12-02 18:47:13 UTC
@Eike:

I've recompiled the current version of libicudata with new tzdata resources.
The how-to is here: http://habrahabr.ru/post/241447/ (on Russian, but translate.google.com can manage it.)

Recompilation solves the issue and I get the desired result. But I've found that libicu can be compiled with the data placed not in a shared library but in raw files on a file system.

In this case we can update only data files without a recompilation of a  library. But I don't know if this behavior has any issues.

Comment 6 Anton 2014-12-02 18:52:50 UTC
P.S.: 
You have to have gcc-c++, icu, libicu-devel packages be installed.

Comment 7 Anton 2014-12-02 19:02:56 UTC
>But I've found that libicu can be compiled with the data placed not in a shared library but in raw files on a file system.
libicu should be configured with PKGDATA_MODE=common in this case, default is PKGDATA_MODE=dll

Comment 8 Anton 2014-12-02 19:18:29 UTC
Sorry, correct command is
./configure --with-data-packaging=(files|archive|library|static|auto)
where default is 'auto' which transforms to 'library' in libicu 50.1.2

Comment 9 Anton 2014-12-08 14:01:16 UTC
There is a more general info about how to update tzdata here: http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data

Comment 12 Mike FABIAN 2018-06-20 05:52:09 UTC
This build fixes the problem:

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16792326

It updates the timezone data to 2018e and also adds the
negative-daylight-savings.patch from upstream (see
http://bugs.icu-project.org/trac/ticket/13566 and
http://bugs.icu-project.org/trac/changeset/40954)

Comment 13 Jens Petersen 2018-06-21 11:14:33 UTC
Can you please file a separate bug for the negative daylight saving change?

Comment 14 Mike FABIAN 2018-06-21 14:43:58 UTC
Here is a build without the extra patch for the negative daylight
savings offset:

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16817677

We don’t need that extra patch at the moment in RHEL-7.

Comment 15 Mike FABIAN 2018-06-25 08:24:43 UTC
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16854122

Change pushed to the rhel-7.6 branch.

Comment 19 errata-xmlrpc 2018-10-30 11:43:01 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/RHBA-2018:3289