Hi,
Attached is a patch that fixes the dates in rpm changelog entries that
are added by spec.vim.
Currently the date is based on LC_TIME and rpm allows only RFC822
(LC_TIME=C) dates.
Reproducer:
> export LC_TIME=de_DE
> vim vim.spec
press maplocalleader key plus 'c'
* Di Apr 12 2016 username <[email protected]>
^^^
This is not allowed by rpm.
Regards
Karsten
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
>From 028f1e25d254c893b373fff6d38bf3c211361b65 Mon Sep 17 00:00:00 2001
From: Karsten Hopp <[email protected]>
Date: Tue, 12 Apr 2016 14:27:22 +0200
Subject: [PATCH] set C locale to get RFC822 formatted date Signed-off-by:
Karsten Hopp <[email protected]>
---
runtime/ftplugin/spec.vim | 3 +++
1 file changed, 3 insertions(+)
diff --git a/runtime/ftplugin/spec.vim b/runtime/ftplugin/spec.vim
index 6d5bf4b..d696bd0 100644
--- a/runtime/ftplugin/spec.vim
+++ b/runtime/ftplugin/spec.vim
@@ -113,7 +113,10 @@ if !exists("*s:SpecChangelog")
endif
endif
if (chgline != -1)
+ let tmptime = v:lc_time
+ execute "language time C"
let parsed_format = "* ".strftime(format)." - ".ver."-".rel
+ execute "language time " . tmptime
let release_info = "+ ".name."-".ver."-".rel
let wrong_format = 0
let wrong_release = 0
--
2.5.5