diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-02-09 16:00:28 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-02-09 16:00:28 +0900 |
commit | ac72a6dc15a89f64c41ba8b920c190e2b8650d6e (patch) | |
tree | f29dcbb3c9bb660c4aa5975c23ec401a171ae1c7 /common | |
parent | 95610c443f7244f7010247b52683e4d321be0a70 (diff) | |
download | gpg2-ac72a6dc15a89f64c41ba8b920c190e2b8650d6e.tar.gz gpg2-ac72a6dc15a89f64c41ba8b920c190e2b8650d6e.tar.bz2 gpg2-ac72a6dc15a89f64c41ba8b920c190e2b8650d6e.zip |
Imported Upstream version 2.2.2upstream/2.2.2
Diffstat (limited to 'common')
-rw-r--r-- | common/gettime.c | 9 |
1 files changed, 6 insertions, 3 deletions
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) { |