Bug#486594: timestamps

James McCoy jamessan at debian.org
Sun Dec 1 05:00:51 UTC 2013


On Sat, Nov 30, 2013 at 11:47:15PM +0100, Louis Bettens wrote:
> 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.

Thanks for your effort!

> 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.

An alternative would be to use the faketime[0] tool to wrap your dch
calls.

[0]: http://packages.debian.org/sid/faketime

> 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.

That does look useful, but if there aren't any side effects to setting
LC_TIME, I'd prefer that over adding a dependency.  It's still simple
enough code.

Cheers,
-- 
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <jamessan at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20131201/49f6f2fe/attachment-0001.sig>


More information about the devscripts-devel mailing list