Fix bug #2905 "Include the signature timestamp in the 'full signature information'"
authorRicardo Mones <ricardo@mones.org>
Mon, 15 Apr 2013 22:33:49 +0000 (00:33 +0200)
committerRicardo Mones <ricardo@mones.org>
Mon, 15 Apr 2013 22:33:49 +0000 (00:33 +0200)
Format used is the same shown in summary view date column.
Original patch by Fabian Keil, thanks! ;-)

src/plugins/pgpcore/sgpgme.c

index df769f4..71ec5eb 100644 (file)
@@ -265,6 +265,8 @@ gchar *sgpgme_sigstat_info_full(gpgme_ctx_t ctx, gpgme_verify_result_t status)
        sig = status->signatures;
        
        while (sig) {
+               char buf[100];
+               struct tm lt;
                gpgme_user_id_t user = NULL;
                gpgme_key_t key;
                gpgme_error_t err;
@@ -290,9 +292,12 @@ gchar *sgpgme_sigstat_info_full(gpgme_ctx_t ctx, gpgme_verify_result_t status)
                        keyid = "?";
                        uid = "?";
                }
+
+               memset(buf, 0, sizeof(buf));
+               fast_strftime(buf, sizeof(buf)-1, prefs_common.date_format, localtime_r(&sig->timestamp, &lt));
                g_string_append_printf(siginfo,
-                       _("Signature made using %s key ID %s\n"),
-                       keytype, keyid);
+                       _("Signature made on %s using %s key ID %s\n"),
+                       buf, keytype, keyid);
                
                switch (gpg_err_code(sig->status)) {
                case GPG_ERR_NO_ERROR: