mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 14:27:26 +01:00
Merge pull request #88 from MihaelaStoica/CA-137237
Fixed XenCenter fatal exception when rebuilding alertList
This commit is contained in:
commit
dd6c1eccde
@ -511,8 +511,15 @@ namespace XenAdmin.Core
|
||||
TimeSpan timeDiff = h.LicenseExpiryUTC.Subtract(referenceDate);
|
||||
|
||||
if (timeDiff.TotalDays < 3653)
|
||||
return DateTimeToString(h.LicenseExpiryUTC.ToLocalTime(),
|
||||
longFormat ? Messages.DATEFORMAT_DMY_LONG : Messages.DATEFORMAT_DMY, true);
|
||||
{
|
||||
var expiryString = "";
|
||||
Program.Invoke(Program.MainWindow, delegate
|
||||
{
|
||||
expiryString = DateTimeToString(h.LicenseExpiryUTC.ToLocalTime(),
|
||||
longFormat ? Messages.DATEFORMAT_DMY_LONG : Messages.DATEFORMAT_DMY, true);
|
||||
});
|
||||
return expiryString;
|
||||
}
|
||||
|
||||
return Messages.LICENSE_NEVER;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user