diff options
author | David Bueno <david@evicertia.com> | 2019-10-09 21:50:46 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2019-10-09 21:50:46 +0300 |
commit | 7df7ceb6d30ebf2a9e4856f155839906c0c64797 (patch) | |
tree | dfc272d5bf25c60c1dff4b68484b464b51fdda9e /mcs/class/System.Web | |
parent | 30886f997fa4fbcd7e7cc585dfd2109941f139c4 (diff) |
[System.Web] Now IsExpired property for FormsAuthenticationTicket compares two dates with same kind (UTC) to avoid unexpected results (#17162)
Fixes #17161
Diffstat (limited to 'mcs/class/System.Web')
-rw-r--r-- | mcs/class/System.Web/System.Web.Security/FormsAuthenticationTicket.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mcs/class/System.Web/System.Web.Security/FormsAuthenticationTicket.cs b/mcs/class/System.Web/System.Web.Security/FormsAuthenticationTicket.cs index 5adad7863bb..344288430fb 100644 --- a/mcs/class/System.Web/System.Web.Security/FormsAuthenticationTicket.cs +++ b/mcs/class/System.Web/System.Web.Security/FormsAuthenticationTicket.cs @@ -187,7 +187,7 @@ namespace System.Web.Security } public bool Expired { - get { return DateTime.Now > expiration; } + get { return DateTime.UtcNow > expiration.ToUniversalTime(); } } public bool IsPersistent { |