Skip Menu |

This queue is for tickets about the Sys-Syslog CPAN distribution.

Report information
The Basics
Id: 105117
Status: resolved
Priority: 0/
Queue: Sys-Syslog

People
Owner: SAPER [...] cpan.org
Requestors: Markus.Laker [...] hds.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.34



Subject: Timestamps violate RFC3164 on the first nine days of each month
Date: Tue, 9 Jun 2015 09:24:19 +0000
To: "bug-Sys-Syslog [...] rt.cpan.org" <bug-Sys-Syslog [...] rt.cpan.org>
From: Markus Laker <Markus.Laker [...] hds.com>
Section 4.1.2 of RFC3164 says: The TIMESTAMP field is the local time and is in the format of "Mmm dd hh:mm:ss" (without the quote marks) where: [...] dd is the day of the month. If the day of the month is less than 10, then it MUST be represented as a space and then the number. For example, the 7th day of August would be represented as "Aug 7", with two spaces between the "g" and the "7". But version 0.33 of Sys::Syslog uses a leading zero instead, producing timestamps such as "Jun 09 10:12:29". Adding the following line immediately after the strftime call fixes the problem: $timestamp =~ s/ ^ (.{4}) 0 /$1 /x; Mandatory information (probably not useful in this case): I'm running Perl v5.20.2 on Debian Jessie. Best regards, Markus
Markus.Laker@hds.com wrote: Show quoted text
> Section 4.1.2 of RFC3164 says: > > The TIMESTAMP field is the local time and is in the format of "Mmm dd > hh:mm:ss" (without the quote marks) where: > > > But version 0.33 of Sys::Syslog uses a leading zero instead, producing > timestamps such as "Jun 09 10:12:29".
Ah. I introduced that bug while fixing another :/ » https://rt.cpan.org/Ticket/Display.html?id=69310 » https://github.com/maddingue/Sys-Syslog/commit/077d4760f8c39201f2529f58e708548da22c8d9e Show quoted text
> Adding the following line > immediately after the strftime call fixes the problem: > > $timestamp =~ s/ ^ (.{4}) 0 /$1 /x;
I think I'll restore using %e where available, and fall back on %d + regexp. Thanks for your report. -- Close the world, txEn eht nepO.
This issue should be fixed with version 0.34, just released. -- Close the world, txEn eht nepO.