[git] GnuPG - branch, master, updated. gnupg-2.2.0-10-gba8afc4

by NIIBE Yutaka cvs at cvs.gnupg.org
Tue Sep 19 09:13:31 CEST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  ba8afc4966cca1f6aaf9b2a9bfc3220782306c2b (commit)
      from  eeb3da6eb717ed6a1a1069a7611eb37503e8672d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ba8afc4966cca1f6aaf9b2a9bfc3220782306c2b
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Tue Sep 19 16:09:05 2017 +0900

    common: Accept the Z-suffix for yymmddThhmmssZ format.
    
    * common/gettime.c (isotime_p): Accept the Z suffix.
    
    --
    
    The intention is use for human interface.
    
    GnuPG-bug-id: 3278
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/common/gettime.c b/common/gettime.c
index 3e1ee55..4ad99f5 100644
--- a/common/gettime.c
+++ b/common/gettime.c
@@ -222,6 +222,8 @@ isotime_p (const char *string)
   for (s++, i=9; i < 15; i++, s++)
     if (!digitp (s))
       return 0;
+  if (*s == 'Z')
+    s++;
   if ( !(!*s || (isascii (*s) && isspace(*s)) || *s == ':' || *s == ','))
     return 0;  /* Wrong delimiter.  */
 
@@ -354,9 +356,10 @@ string2isotime (gnupg_isotime_t atime, const char *string)
 }
 
 
-/* Scan an ISO timestamp and return an Epoch based timestamp.  The only
-   supported format is "yyyymmddThhmmss" delimited by white space, nul, a
-   colon or a comma.  Returns (time_t)(-1) for an invalid string.  */
+/* Scan an ISO timestamp and return an Epoch based timestamp.  The
+   only supported format is "yyyymmddThhmmss[Z]" delimited by white
+   space, nul, a colon or a comma.  Returns (time_t)(-1) for an
+   invalid string.  */
 time_t
 isotime2epoch (const char *string)
 {

-----------------------------------------------------------------------

Summary of changes:
 common/gettime.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list