summary refs log tree commit diff
path: root/crypto/src/asn1/DerUTCTime.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/DerUTCTime.cs')
-rw-r--r--crypto/src/asn1/DerUTCTime.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/src/asn1/DerUTCTime.cs b/crypto/src/asn1/DerUTCTime.cs

index ab8ca792d..99af8bf6b 100644 --- a/crypto/src/asn1/DerUTCTime.cs +++ b/crypto/src/asn1/DerUTCTime.cs
@@ -27,7 +27,7 @@ namespace Org.BouncyCastle.Asn1 return (DerUtcTime)obj; } - throw new ArgumentException("illegal object in GetInstance: " + obj.GetType().Name); + throw new ArgumentException("illegal object in GetInstance: " + Platform.GetTypeName(obj)); } /** @@ -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(