From 75c8da5912273da8691de3bc4ed5063fbc80007a Mon Sep 17 00:00:00 2001 From: Chad Wilson <29788154+chadlwilson@users.noreply.github.com> Date: Tue, 22 Sep 2026 17:33:06 +0800 Subject: [PATCH] [test] correct test to be agnostic of local TZ This test fails if running in a local TZ that greater than UTC+6, because it incorrectly fails to normalize to UTC before extracting the date from a zoned timestamp inside a CRL. The actual CRL has `revocationDate utcTime Time UTCTime 2014-07-07 18:31:35 UTC`. In UTC+8, that time is not the 7th July; it's the 8th. Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com> --- src/test/ruby/x509/test_x509crl.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/ruby/x509/test_x509crl.rb b/src/test/ruby/x509/test_x509crl.rb index 4ca5e8dfd..8e88b7c75 100644 --- a/src/test/ruby/x509/test_x509crl.rb +++ b/src/test/ruby/x509/test_x509crl.rb @@ -99,7 +99,7 @@ def test_revoked_crl_loading revoked = crl.revoked.last assert_equal last_serial.to_i(16).to_s, revoked.serial.to_s - assert_equal Date.new(2014, 07, 07), Date.parse(revoked.time.strftime('%Y/%m/%d')) + assert_equal Date.new(2014, 07, 07), Date.parse(revoked.time.utc.strftime('%Y/%m/%d')) end # NOTE: same as OpenSSL's test_extension but without extension order requirement ...