Skip to content

Commit b1e7c2f

Browse files
committed
Fix CRL test with uncommon timezone
This fixes a test failure that occurs when the environment timezone is set to GMT-14, eg. using TZ=/usr/share/zoneinfo/Etc/GMT-14 The defect was found as part of the reproducible builds project.
1 parent 9435a2b commit b1e7c2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/unit/puppetlabs/puppetserver/certificate_authority_test.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
(java.nio.file.attribute FileAttribute)
2727
(java.security MessageDigest PublicKey)
2828
(java.security.cert X509CRL X509Certificate)
29-
(java.time LocalDateTime ZoneOffset)
29+
(java.time LocalDateTime ZoneOffset ZonedDateTime)
3030
(java.util Date)
3131
(java.util.concurrent TimeUnit)
3232
(java.util.concurrent.locks ReentrantReadWriteLock)
@@ -2177,9 +2177,9 @@
21772177
public-key
21782178
(.getThisUpdate crl)
21792179
;; create a date 5 days from now using java.time
2180-
(-> (LocalDateTime/now)
2180+
(-> (ZonedDateTime/now)
21812181
(.plusDays 5)
2182-
(.toInstant ZoneOffset/UTC)
2182+
(.toInstant)
21832183
(Date/from))
21842184
(biginteger 1)
21852185
nil)

0 commit comments

Comments
 (0)