summary refs log tree commit diff
path: root/crypto/src/asn1
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2015-11-08 19:41:15 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2015-11-08 19:41:15 +0700
commit3a14efc2a0f5bef8161969310cd3638a55a662f9 (patch)
treeccfa999d911e7ba2113ad79a620c1c11c8139d24 /crypto/src/asn1
parentWhitespace, comments, unused import, missing test code (diff)
parentRemove old TODO (diff)
downloadBouncyCastle.NET-ed25519-3a14efc2a0f5bef8161969310cd3638a55a662f9.tar.xz
Merge branch 'master' of git.bouncycastle.org:bc-csharp into pcl
Diffstat (limited to 'crypto/src/asn1')
-rw-r--r--crypto/src/asn1/DerGeneralizedTime.cs4
-rw-r--r--crypto/src/asn1/DerUTCTime.cs4
-rw-r--r--crypto/src/asn1/x509/Time.cs4
3 files changed, 12 insertions, 0 deletions
diff --git a/crypto/src/asn1/DerGeneralizedTime.cs b/crypto/src/asn1/DerGeneralizedTime.cs
index 40ec17b2a..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(
diff --git a/crypto/src/asn1/DerUTCTime.cs b/crypto/src/asn1/DerUTCTime.cs
index ebf57198f..4f0792636 100644
--- a/crypto/src/asn1/DerUTCTime.cs
+++ b/crypto/src/asn1/DerUTCTime.cs
@@ -86,7 +86,11 @@ namespace Org.BouncyCastle.Asn1
         public DerUtcTime(
             DateTime time)
         {
+#if PORTABLE
             this.time = time.ToUniversalTime().ToString("yyMMddHHmmss", CultureInfo.InvariantCulture) + "Z";
+#else
+            this.time = time.ToString("yyMMddHHmmss", CultureInfo.InvariantCulture) + "Z";
+#endif
         }
 
 		internal DerUtcTime(
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));