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 1751381 - perl Time::Piece does not respect julian day
Summary: perl Time::Piece does not respect julian day
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: perl
Version: 7.7
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jitka Plesnikova
QA Contact: icesalov
Lenka Špačková
URL:
Whiteboard:
Depends On:
Blocks: 1780579
TreeView+ depends on / blocked
 
Reported: 2019-09-11 21:05 UTC by Ryan Mullett
Modified: 2023-12-15 16:45 UTC (History)
6 users (show)

Fixed In Version: perl-5.16.3-296.el7
Doc Type: Bug Fix
Doc Text:
.The `strptime()` method of the `Time::Piece` Perl module now correctly parses Julian dates The `Time::Piece` Perl module did not correctly parse a day of the year (`%j`) using the `strptime()` method. Consequently, Julian dates were parsed incorrectly. This bug has been fixed, and the `strptime()` method provided by the `Time::Piece` module now handles Julian dates properly.
Clone Of:
Environment:
Last Closed: 2020-09-29 19:18:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Fix day of year parsing (1.24 KB, patch)
2019-09-12 08:20 UTC, Jitka Plesnikova
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:3854 0 None None None 2020-09-29 19:18:24 UTC

Description Ryan Mullett 2019-09-11 21:05:24 UTC
Description of problem:


Version-Release number of selected component (if applicable):
RHEL 7.7
perl 5.16.3
Time::Piece 1.20_01

- Resolved upstream with this bug: 
  https://rt.cpan.org/Public/Bug/Display.html?id=88211

How reproducible:
Always

Steps to Reproduce:
1. sudo yum install perl-Time-Piece -y
2. perl -mTime::Piece -e 'print Time::Piece->strptime("2019 1", "%Y %j")->strftime("%c")'
3. perl -mTime::Piece -e 'print Time::Piece->strptime("2019 32", "%Y %j")->strftime("%c")'

Actual results:
Tue 01 Jan 2019 12:00:00 AM UTC
Tue 01 Jan 2019 12:00:00 AM UTC

Expected results:
Tue 01 Jan 2019 12:00:00 AM UTC
Fri 01 Feb 2019 12:00:00 AM UTC

Additional info:

Comment 2 Jitka Plesnikova 2019-09-12 08:20:59 UTC
Created attachment 1614383 [details]
Fix day of year parsing

Comment 3 Petr Pisar 2019-11-21 15:46:02 UTC
I confirm this issue in perl-Time-Piece-1.20.1-294.el7_6.

Comment 6 Jitka Plesnikova 2020-01-20 11:50:31 UTC
When I tried to build the patched perl, I found that tests ./cpan/Time-Local/t/Local.t failed with this error:

../cpan/Time-Local/t/Local.t ...................................... 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/163 subtests 
	(less 11 skipped subtests: 150 okay)
#   Failed test 'timelocal year for 1970 1 2 0 0 0'
#   at t/Local.t line 108.
#          got: '170'
#     expected: '70'
#   Failed test 'timegm year for 1970 1 2 0 0 0'
#   at t/Local.t line 124.
#          got: '170'
#     expected: '70'
# Looks like you failed 2 tests of 163.


The issue is described in
https://github.com/Perl/perl5/issues/17410

The possible fix is provided here
https://rt.cpan.org/Public/Bug/Display.html?id=124787

I use the patch to solve a build failure.

Comment 14 errata-xmlrpc 2020-09-29 19:18:20 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 (perl bug fix and enhancement update), 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-2020:3854


Note You need to log in before you can comment on or make changes to this bug.