summary refs log tree commit diff
path: root/crypto/test
diff options
context:
space:
mode:
authorOren Novotny <oren@novotny.org>2018-02-12 14:55:46 -0500
committerOren Novotny <oren@novotny.org>2018-02-12 14:55:46 -0500
commitc970a001e23e9d0d29a86125c3da874960c5d81b (patch)
treeadba4282a4a4f85d7ba7ac5e04ce91f687d7d1e8 /crypto/test
parentMerge branch 'master' into netstandard (diff)
downloadBouncyCastle.NET-ed25519-c970a001e23e9d0d29a86125c3da874960c5d81b.tar.xz
fix failing test due to utc time
Diffstat (limited to 'crypto/test')
-rw-r--r--crypto/test/src/x509/test/TestCertificateGen.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/test/src/x509/test/TestCertificateGen.cs b/crypto/test/src/x509/test/TestCertificateGen.cs
index 448bb8794..019c2a460 100644
--- a/crypto/test/src/x509/test/TestCertificateGen.cs
+++ b/crypto/test/src/x509/test/TestCertificateGen.cs
@@ -263,8 +263,8 @@ namespace Org.BouncyCastle.X509.Tests
             certGen.SetSerialNumber(BigInteger.One);
 
             certGen.SetIssuerDN(new X509Name(ord, attrs));
-            certGen.SetNotBefore(DateTime.Today.Subtract(new TimeSpan(1, 0, 0, 0)));
-            certGen.SetNotAfter(DateTime.Today.AddDays(1));
+            certGen.SetNotBefore(DateTime.UtcNow.AddDays(-1));
+            certGen.SetNotAfter(DateTime.UtcNow.AddDays(1));
             certGen.SetSubjectDN(new X509Name(ord, attrs));
             certGen.SetPublicKey(ecPub);
             certGen.SetSignatureAlgorithm("SHA1WITHECDSA");