Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2058964

Summary: glibc: strptime fails to parse date with %z suffix
Product: Red Hat Enterprise Linux 7 Reporter: Spongman <piersh>
Component: glibcAssignee: glibc team <glibc-bugzilla>
Status: CLOSED WONTFIX QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.9CC: ashankar, codonell, dj, fweimer, mnewsome, pfrankli, sipoyare
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-04 14:27:13 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:

Description Spongman 2022-02-27 09:29:02 UTC
$ cat a.c
#define _XOPEN_SOURCE
#include <stdio.h>
#include <time.h>

int main() {
    struct tm tm_ = {0};
    puts(strptime("20010203T040506Z", "%Y%m%dT%H%M%S%z", &tm_) ? "ok" : "error");
}

$ gcc a.c
$ ldd a.out
        linux-vdso.so.1 =>  (0x00007ffd09585000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fb67529a000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fb675667000)
$ ls -l /lib64/libc.so.6
lrwxrwxrwx. 1 root root 12 Jun 21  2019 /lib64/libc.so.6 -> libc-2.17.so
$ ./a.out
error

this works on Debian 10.11 and Ubuntu 20.04

Comment 3 Florian Weimer 2022-02-27 14:34:49 UTC
Have you filed a customer support ticket for this issue?

  https://access.redhat.com/support/cases/

Thanks.

Red Hat Enterprise Linux 7 is in Maintenance Support 2 Phase:

  https://access.redhat.com/support/policy/updates/errata#Maintenance_Support_2_Phase

During this phase, only “Critical and Importantix impact Security Advisories (RHSAs) and selected (at Red Hat discretion) Urgent Priority Bug Fix Advisories (RHBAs)” are expected to be released, and this request for enhancement does not seem to fall under either category.


For context, this was fixed upstream in this commit:

commit 900f33e23eaa20c0587f5a191b632a606e7fba5d
Author: Vincent Bernat <Vincent.Bernat>
Date:   Thu Sep 17 09:55:04 2015 +0200

    time: in strptime(), make %z accept Z as a time zone [BZ #17886]
    
    In ISO 8601, the timezone can be 'Z' instead of using
    digits. 2014-08-17T12:33:12+0000 is often expressed as
    2014-08-17T12:33:12Z.

It made it into glibc 2.23, so it's not included in Red Hat Enterprise Linux 7, which is based on glibc 2.17.

Comment 5 Carlos O'Donell 2022-03-04 14:27:13 UTC
Red Hat Enterprise Linux 7 is in Maintenance Support 2 Phase and as such we are not considering moderate priority fixes.

Please consider Red Hat Enterprise Linux 8 since the bug is fixed in that release.

I'm marking this CLOSED/WONTFIX.

Comment 6 Red Hat Bugzilla 2023-11-16 04:25:24 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days