diff --git a/XenAdmin/Dialogs/LicenseManager/LicenseStatus.cs b/XenAdmin/Dialogs/LicenseManager/LicenseStatus.cs index bd5a96df6..e383fb846 100644 --- a/XenAdmin/Dialogs/LicenseManager/LicenseStatus.cs +++ b/XenAdmin/Dialogs/LicenseManager/LicenseStatus.cs @@ -361,9 +361,8 @@ namespace XenAdmin.Dialogs { entitlements.Add(Messages.LICENSE_NOT_ELIGIBLE_FOR_SUPPORT); } - } - - if (CurrentState == HostState.Free) + } + else if (CurrentState == HostState.Free) { entitlements.Add(Messages.LICENSE_NOT_ELIGIBLE_FOR_SUPPORT); } diff --git a/XenModel/XenAPI-Extensions/Host.cs b/XenModel/XenAPI-Extensions/Host.cs index 063e74ca3..1d2dc33ef 100644 --- a/XenModel/XenAPI-Extensions/Host.cs +++ b/XenModel/XenAPI-Extensions/Host.cs @@ -353,10 +353,10 @@ namespace XenAPI { var cssExpiry = LicenseCssExpiry(); - if (cssExpiry != null) + if (cssExpiry.HasValue) { // User can circumvent this by changing system date - return DateTime.Now > cssExpiry; + return DateTime.UtcNow > cssExpiry.Value; } return false;