Red Hat Bugzilla – Bug 922844
rotatelogs %Z does not use correct timezone respecting DST
Last modified: 2016-04-18 06:22:36 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
Reassigning to "apr". It's apr_strftime problem.
Created attachment 810501 [details] reproducer
Missed this one... "rotatelogs -l" should do the right thing here.
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
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.
Created attachment 812373 [details] proposed patch
Fixed upstream: http://svn.apache.org/r1532281 http://svn.apache.org/r1532289
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