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.cs9
1 files changed, 1 insertions, 8 deletions
diff --git a/crypto/src/asn1/DerGeneralizedTime.cs b/crypto/src/asn1/DerGeneralizedTime.cs
index 22dc04912..898a3d585 100644
--- a/crypto/src/asn1/DerGeneralizedTime.cs
+++ b/crypto/src/asn1/DerGeneralizedTime.cs
@@ -282,15 +282,8 @@ namespace Org.BouncyCastle.Asn1
             DateTimeStyles style = DateTimeStyles.None;
             if (Platform.EndsWith(format, "Z"))
             {
-                try
-                {
-                    style = (DateTimeStyles)Enums.GetEnumValue(typeof(DateTimeStyles), "AssumeUniversal");
-                }
-                catch (Exception)
-                {
-                }
-
                 style |= DateTimeStyles.AdjustToUniversal;
+                style |= DateTimeStyles.AssumeUniversal;
             }
 
             DateTime dt = DateTime.ParseExact(s, format, DateTimeFormatInfo.InvariantInfo, style);