| |
@@ -154,7 +154,10 @@
|
| |
evrstring = ' - %s' % evr
|
| |
else:
|
| |
evrstring = ''
|
| |
- date = time.strftime("%a %b %d %T %Z %Y", time.gmtime())
|
| |
+ if opts.legacy_datestamp:
|
| |
+ date = time.strftime("%a %b %e %Y", time.gmtime())
|
| |
+ else:
|
| |
+ 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
|
| |
@@ -285,6 +288,8 @@
|
| |
parser.add_option("-n", "--new",
|
| |
help="set new version and reset/set release "
|
| |
"(simple spec files only)")
|
| |
+ parser.add_option("-D", "--legacy-datestamp", default=False, action='store_true',
|
| |
+ help="use legacy datestamp for changelog entries")
|
| |
parser.add_option("-V", "--verbose", default=False, action='store_true',
|
| |
help="more output")
|
| |
parser.add_option("-v", "--version", default=False, action='store_true',
|
| |
If a spec file is being created on a system with an old RPM version
that does not support the richer datestamp format, we should not use
full datestamps when creating the spec.
Additionally, if someone wants to bump the spec file with the legacy
datestamp format that is still supported (for a spec that supports
targeting older systems using versions of RPM that do not support it),
then the new
--legacy-datestamp
switch for bumpspec will generatecompatible changelog entries for it.
Fixes #63