Bug#486594: timestamps

Louis Bettens louis at bettens.info
Sat Nov 30 22:47:15 UTC 2013


Good evening developers,
I'm a novice contributor and I have done some work on your scripts, 
which I would like to submit to you.

I didn't found any library that can produce d/changelog files, so I 
decided to invoke dch with the right options, besides it can manage 
multi-maintainer releases, and since this feature is hardcoded, I 
thought there was no library supporting it at all. I needed to create 
entries with specific timestamps, so I started hacking dch to implement 
an option for that.

Since there seems to be no way to feed a "%s" value to date, I decided 
to use strftime(), and thus get rid of the date -R invocation. It seems 
to me that globally setting the locale to "C" doesn't cause trouble 
("dch Ìnîtíãl release." is fine) but I may be wrong. However, there 
could be a better solution with the Email::Date::Format package ; it 
takes care of formatting time according to RFC 2822 and doesn't touch 
the locale. It does exactly what we want in a clean way, so it's 
probably worth depending on it.

Please take time to judge the attached patches. If you ask, I can 
rearrange them, removing the intermediate step `date` -> strftime() -> 
email_date, for example. I didn't update the changelog (no joke 
intended) to keep patches light.

Greetings,
Louis
-- 
When I grow up,
I will run a Tor node around the clock,
To help threatened protesters 'round the world.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-debchange-replace-call-to-date-R-with-strftime.patch
Type: text/x-patch
Size: 1072 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20131130/e295c1c7/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-add-timestamp.patch
Type: text/x-patch
Size: 2258 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20131130/e295c1c7/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-bts-replace-call-to-date-R-with-strftime.patch
Type: text/x-patch
Size: 1251 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20131130/e295c1c7/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-mass-bug-replace-call-to-date-R-with-strftime.patch
Type: text/x-patch
Size: 988 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20131130/e295c1c7/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-use-Email-Date-Format-instead-of-strftime.patch
Type: text/x-patch
Size: 3301 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20131130/e295c1c7/attachment-0009.bin>


More information about the devscripts-devel mailing list