summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2017-09-08 07:21:29 +0200
committerWerner Koch <wk@gnupg.org>2017-09-11 11:39:17 +0200
commita172759b5088ae086c0caa2e7d4d0ea346b28a90 (patch)
tree015c6ad260cd779677716775e86b8608bf454098 /tests
parentscd: Fix for large ECC keys. (diff)
downloadgnupg2-a172759b5088ae086c0caa2e7d4d0ea346b28a90.tar.xz
gnupg2-a172759b5088ae086c0caa2e7d4d0ea346b28a90.zip
tests: Fix a test which specifies expiration date.
* tests/openpgp/quick-key-manipulation.scm: Fix expiration time comparison. -- This is a bug fix for Amelia Earhart who is probably in UTC-12. When expiration date is specified, GnuPG interprets it as noon of the date in local time. Before this fix, the test compared the value by 2145916800 which is 2038-01-01 00:00:00 in UTC with allowance of 1 day. When the test was ran in UTC-12 timezone, it failed because of noon in the timezone is midnight of the next day in UTC. GnuPG-bug-id: 3393 Reported-by: Daniel Kahn Gillmor Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/openpgp/quick-key-manipulation.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/openpgp/quick-key-manipulation.scm b/tests/openpgp/quick-key-manipulation.scm
index c21abfee2..2023f17bd 100755
--- a/tests/openpgp/quick-key-manipulation.scm
+++ b/tests/openpgp/quick-key-manipulation.scm
@@ -178,11 +178,11 @@
(lambda (subkey)
(assert (= 1 (:alg subkey)))
(assert (string-contains? (:cap subkey) "s"))
- (assert (time-matches? 2145916800 ;; 2038-01-01
- ;; 4260207600 ;; 2105-01-01
+ (assert (time-matches? 2145960000 ;; UTC 2038-01-01 12:00:00
+ ;; 4260254400 ;; UTC 2105-01-01 12:00:00
(string->number (:expire subkey))
- ;; This is off by 12h, but I guess it just
- ;; choses the middle of the day.
+ ;; GnuPG choses the middle of the day (local time)
+ ;; when no hh:mm:ss is specified
(days->seconds 1))))
(lambda (subkey)
(assert (= 1 (:alg subkey)))