Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 922844 - rotatelogs %Z does not use correct timezone respecting DST
rotatelogs %Z does not use correct timezone respecting DST
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: httpd (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity low
: rc
: ---
Assigned To: Web Stack Team
Filip Holec
:
Depends On:
Blocks: 921537 1244545
  Show dependency treegraph
 
Reported: 2013-03-18 12:28 EDT by Luke Meyer
Modified: 2016-04-18 06:22 EDT (History)
5 users (show)

See Also:
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.
Story Points: ---
Clone Of:
: 1244545 (view as bug list)
Environment:
Last Closed: 2015-07-22 01:52:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1249 normal SHIPPED_LIVE Low: httpd security, bug fix, and enhancement update 2015-07-20 13:50:12 EDT

  None (edit)
Description Luke Meyer 2013-03-18 12:28:54 EDT
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 08:30:18 EDT
Reassigning to "apr". It's apr_strftime problem.
Comment 2 Jan Kaluža 2013-10-10 08:30:57 EDT
Created attachment 810501 [details]
reproducer
Comment 4 Joe Orton 2013-10-10 12:05:58 EDT
Missed this one...

"rotatelogs -l" should do the right thing here.
Comment 5 Luke Meyer 2013-10-10 13:32:13 EDT
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 Product and Program Management 2013-10-13 19:47:47 EDT
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 03:33:03 EDT
Created attachment 812373 [details]
proposed patch
Comment 8 Joe Orton 2013-11-11 06:03:34 EST
Fixed upstream:

http://svn.apache.org/r1532281
http://svn.apache.org/r1532289
Comment 14 errata-xmlrpc 2015-07-22 01:52:37 EDT
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.