[devscripts] 03/04: mass-bug: replace call to date -R with strftime()
James McCoy
jamessan at debian.org
Sat Dec 7 03:13:08 UTC 2013
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch master
in repository devscripts.
commit 67a6fbe1c1bb5b8ebbf82bb4cc98ce1bf836991f
Author: Louis Bettens <louis at bettens.info>
Date: Sat Nov 30 20:55:09 2013 +0100
mass-bug: replace call to date -R with strftime()
Signed-off-by: James McCoy <jamessan at debian.org>
---
scripts/mass-bug.pl | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/scripts/mass-bug.pl b/scripts/mass-bug.pl
index ad0fa20..247de52 100755
--- a/scripts/mass-bug.pl
+++ b/scripts/mass-bug.pl
@@ -152,6 +152,9 @@ use strict;
use Getopt::Long qw(:config gnu_getopt);
use Text::Wrap;
use File::Basename;
+use POSIX qw(locale_h strftime);
+
+setlocale(LC_TIME, "C"); # so that strftime is locale independent
my $progname = basename($0);
$Text::Wrap::columns=70;
@@ -322,8 +325,7 @@ sub mailbts {
my ($subject, $body, $to, $from) = @_;
if (defined $from) {
- my $date = `date -R`;
- chomp $date;
+ my $date = strftime "%a, %d %b %Y %T %z", localtime;
my $pid = open(MAIL, "|-");
if (! defined $pid) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list