summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNAKAMURA Hiroshi <nahi@keynauts.com>2003-07-08 16:12:19 +0000
committerNAKAMURA Hiroshi <nahi@keynauts.com>2003-07-08 16:12:19 +0000
commit1abe241dd326622e91b7d06a932c74473067ff63 (patch)
tree00d4db5db488cd05dd861e405c6c14d6a60c37da
parent8ef77616d387aad9a96525c8adcaf08a262d6f7b (diff)
downloadruby-openssl-history-1abe241dd326622e91b7d06a932c74473067ff63.tar.gz
Timezone insensitive time comarison.
-rwxr-xr-xtest/tc_x509crl.rb4
-rwxr-xr-xtest/tc_x509revoked.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/test/tc_x509crl.rb b/test/tc_x509crl.rb
index 443c667..7c91ed0 100755
--- a/test/tc_x509crl.rb
+++ b/test/tc_x509crl.rb
@@ -71,7 +71,7 @@ class TC_CRL < Test::Unit::TestCase
# empty last_update throws "unknown time format"
#
$crl.last_update = t
- assert_equal(t.to_s, $crl.last_update.to_s, "last_update")
+ assert_equal(t.dup.utc.to_s, $crl.last_update.dup.utc.to_s, "last_update")
end
def test_04next_update
t = Time.now + 24 * 60 * 60
@@ -81,7 +81,7 @@ class TC_CRL < Test::Unit::TestCase
# empty next_update throws "unknown time format"
#
$crl.next_update = t
- assert_equal(t.to_s, $crl.next_update.to_s, "next_update")
+ assert_equal(t.dup.utc.to_s, $crl.next_update.dup.utc.to_s, "next_update")
end
def test_05revoked
r1 = Revoked.new()
diff --git a/test/tc_x509revoked.rb b/test/tc_x509revoked.rb
index 79c012e..e718fa9 100755
--- a/test/tc_x509revoked.rb
+++ b/test/tc_x509revoked.rb
@@ -40,7 +40,7 @@ class TC_Revoked < Test::Unit::TestCase
t = Time.now
@rev.time = t
- assert_equal(t.to_s, @rev.time.to_s, "time")
+ assert_equal(t.dup.utc.to_s, @rev.time.dup.utc.to_s, "time")
end
def test_extensions
##