[Rpm-maint] [PATCH] Extend %changelog to support full timestamps

Florian Festi ffesti at redhat.com
Thu Oct 6 14:36:58 UTC 2016


On 10/06/2016 02:33 PM, Florian Weimer wrote:
> On 10/06/2016 09:10 AM, Pavlina Varekova wrote:
>> Extend %changelog to support full timestamps
>>
>> The newly accepted date format is
>>
>> Mon Jan 6 09:02:22 CEST 2016
>>
>> (like output of "date" command). Original format "Mon Jun 6 2016" is
>> still
>> supported.
> 
> I think it would be better to use ISO 8601 format (perhaps with space
> instead of 'T' as the date/time separator).  The week day information is
> redundant and only causes consistency issues.

I am really not a fan of the format but it is what's already implemented
in rpm - especially on output with the :date and :day formats (which
basically do date %a %b %d %Y and date %c). So this is the right way to
go. I agree that the days of week are somehow redundant and an
annoyance. But they ca be made optional later in another patch.

Wrt the actual code: It's just a minor nit pick, but there are several
lines duplicated in the two if / else blocks. Parsing the year and
generating the final result can probably be done outside of the if else
and those saving a few lines.

Florian

-- 

Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham,
Michael O'Neill


More information about the Rpm-maint mailing list