Checking how long ago the pool was last synced should be done in relation to the server time.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
This commit is contained in:
Konstantina Chremmou 2023-08-07 19:31:58 +01:00
parent 03eb2f08d1
commit f3874a85f8

View File

@ -66,7 +66,7 @@ namespace XenAdmin.Alerts
if (Helpers.XapiEqualOrGreater_23_18_0(connection))
{
var pool = Helpers.GetPoolOfOne(connection);
var timestamp = DateTime.UtcNow;
var timestamp = DateTime.UtcNow - connection.ServerTimeOffset;
if (timestamp - pool.last_update_sync >= TimeSpan.FromDays(90))
{
@ -120,7 +120,7 @@ namespace XenAdmin.Alerts
public static bool TryCreate(IXenConnection connection, out Alert alert)
{
var pool = Helpers.GetPoolOfOne(connection);
var timestamp = DateTime.UtcNow;
var timestamp = DateTime.UtcNow - connection.ServerTimeOffset;
if (pool.repositories.Count == 0)
{