From e1007c7cd92d8d27c93c615054b5e65d34f23e5b Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Aug 19 2020 11:52:23 +0000 Subject: bumpspec,newspec: Use full timestamps consistently newspec was using local timezone while bumpspec was not, which is inconsistent and not useful. Switch to using local time zone consistently. --- diff --git a/rpmdev-bumpspec b/rpmdev-bumpspec index 2e84797..5a40f4d 100755 --- a/rpmdev-bumpspec +++ b/rpmdev-bumpspec @@ -154,7 +154,7 @@ class SpecFile(object): evrstring = ' - %s' % evr else: evrstring = '' - date = time.strftime("%a %b %d %T %Z %Y", time.gmtime()) + date = time.strftime("%a %b %e %T %Z %Y", time.localtime()) newchangelogentry = "* %s %s%s\n%s\n\n" % \ (date, email, evrstring, entry) self.lines[i] += newchangelogentry diff --git a/rpmdev-newspec.in b/rpmdev-newspec.in index 2818f27..d58d541 100644 --- a/rpmdev-newspec.in +++ b/rpmdev-newspec.in @@ -293,7 +293,7 @@ cat "$tempspec" | sed -rne " $ { g s/^(Name:[ \\t]*)[^\\n]*/\\1$appname/IMg - s|^%changelog\\s*|%changelog\\n* $(LC_ALL=C date +'%a %b %d %T %Z %Y') $(rpmdev-packager)\\n- |Mg + s|^%changelog\\s*|%changelog\\n* $(LC_ALL=C date +'%a %b %e %T %Z %Y') $(rpmdev-packager)\\n- |Mg $specfilter p }" > "$specfile"