summary refs log tree commit diff
path: root/crypto/src/asn1/x509/Time.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/x509/Time.cs')
-rw-r--r--crypto/src/asn1/x509/Time.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/src/asn1/x509/Time.cs b/crypto/src/asn1/x509/Time.cs
index 770d59d46..ffe293521 100644
--- a/crypto/src/asn1/x509/Time.cs
+++ b/crypto/src/asn1/x509/Time.cs
@@ -34,7 +34,11 @@ namespace Org.BouncyCastle.Asn1.X509
         public Time(
             DateTime date)
         {
+#if PORTABLE
             string d = date.ToUniversalTime().ToString("yyyyMMddHHmmss", CultureInfo.InvariantCulture) + "Z";
+#else
+            string d = date.ToString("yyyyMMddHHmmss", CultureInfo.InvariantCulture) + "Z";
+#endif
 
             int year = int.Parse(d.Substring(0, 4));