summary refs log tree commit diff
path: root/crypto/src/asn1/DerGeneralizedTime.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/DerGeneralizedTime.cs')
-rw-r--r--crypto/src/asn1/DerGeneralizedTime.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/src/asn1/DerGeneralizedTime.cs b/crypto/src/asn1/DerGeneralizedTime.cs
index 152596678..17c42e7cf 100644
--- a/crypto/src/asn1/DerGeneralizedTime.cs
+++ b/crypto/src/asn1/DerGeneralizedTime.cs
@@ -83,7 +83,11 @@ namespace Org.BouncyCastle.Asn1
         public DerGeneralizedTime(
             DateTime time)
         {
+#if PORTABLE
+            this.time = time.ToUniversalTime().ToString(@"yyyyMMddHHmmss\Z");
+#else
             this.time = time.ToString(@"yyyyMMddHHmmss\Z");
+#endif
         }
 
         internal DerGeneralizedTime(