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 922844 - rotatelogs %Z does not use correct timezone respecting DST
Summary: rotatelogs %Z does not use correct timezone respecting DST
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: httpd
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Luboš Uhliarik
QA Contact: Filip Holec
URL:
Whiteboard:
Depends On:
Blocks: 921537 1244545
TreeView+ depends on / blocked
 
Reported: 2013-03-18 16:28 UTC by Luke Meyer
Modified: 2021-01-14 09:34 UTC (History)
5 users (show)

Fixed In Version: httpd-2.2.15-40.el6
Doc Type: Bug Fix
Doc Text:
Previously, the rotatelogs utility did not correctly handle local time. Consequently, when using rotatelogs with a date format including "%Z", "%Z" was replaced by the timezone name, disregarding the daylight saving time. This bug has been fixed, and rotatelogs now expands the "%Z" variable in the date format correctly.
Clone Of:
: 1244545 (view as bug list)
Environment:
Last Closed: 2015-07-22 05:52:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
reproducer (530 bytes, patch)
2013-10-10 12:30 UTC, Jan Kaluža
no flags Details | Diff
proposed patch (758 bytes, patch)
2013-10-15 07:33 UTC, Jan Kaluža
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1249 0 normal SHIPPED_LIVE Low: httpd security, bug fix, and enhancement update 2015-07-20 17:50:12 UTC

Description Luke Meyer 2013-03-18 16:28:54 UTC
Description of problem:
At least right now, when I direct rotatelogs to put the timezone in the log file name, it does not appear to notice that DST is in effect.

Version-Release number of selected component (if applicable):
httpd-2.2.15-26.el6.x86_64
tzdata-2012j-2.el6.noarch

How reproducible:
Always (at least for now)

Steps to Reproduce:
1. ln -sf  /usr/share/zoneinfo/US/Eastern /etc/localtime (other DST zones will do as well)
2. date
3. echo 1 | rotatelogs '/tmp/foo-%Y%m%d-%H%M%S-%Z' 60
4. ls /tmp/foo*
  
Actual results:
2. Mon Mar 18 12:25:06 EDT 2013
4. /tmp/foo-20130318-162500-EST

Expected results:
4. /tmp/foo-20130318-162500-EDT

Comment 1 Jan Kaluža 2013-10-10 12:30:18 UTC
Reassigning to "apr". It's apr_strftime problem.

Comment 2 Jan Kaluža 2013-10-10 12:30:57 UTC
Created attachment 810501 [details]
reproducer

Comment 4 Joe Orton 2013-10-10 16:05:58 UTC
Missed this one...

"rotatelogs -l" should do the right thing here.

Comment 5 Luke Meyer 2013-10-10 17:32:13 UTC
Hmm, that doesn't appear to help, sorry.

# ln -sf  /usr/share/zoneinfo/US/Eastern /etc/localtime
# date
Thu Oct 10 13:31:14 EDT 2013
# echo 1 | rotatelogs -l '/tmp/foo-%Y%m%d-%H%M%S-%Z' 60
# ls /tmp/foo*
/tmp/foo-20131010-133100-EST

Comment 6 RHEL Program Management 2013-10-13 23:47:47 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 7 Jan Kaluža 2013-10-15 07:33:03 UTC
Created attachment 812373 [details]
proposed patch

Comment 8 Joe Orton 2013-11-11 11:03:34 UTC
Fixed upstream:

http://svn.apache.org/r1532281
http://svn.apache.org/r1532289

Comment 14 errata-xmlrpc 2015-07-22 05:52:37 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://rhn.redhat.com/errata/RHSA-2015-1249.html


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