case 4684 - server log records the next automatic backup at startup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 16:01:06 -07:00
parent d34adeb321
commit be500d2279
3 changed files with 16 additions and 0 deletions

View File

@@ -89,5 +89,17 @@ namespace AyaNova.Util
return TimeZoneInfo.ConvertTimeToUtc(local, TimeZoneInfo.Local);
}
//case 4684: the backup schedule as written to the server log, on the server's clock as the backup time is set
internal static string BackupStatusText()
{
if (!Backup.Active)
return "Automatic backup - inactive";
var utc = DateTime.SpecifyKind(NextBackup, DateTimeKind.Utc);
var local = TimeZoneInfo.ConvertTimeFromUtc(utc, TimeZoneInfo.Local);
//from the UTC moment, so the night the clocks go back shows the offset of the hour actually meant
var offset = TimeZoneInfo.Local.GetUtcOffset(utc);
return $"Automatic backup - next at {local:yyyy-MM-dd HH:mm} (UTC{(offset < TimeSpan.Zero ? "-" : "+")}{offset:hh\\:mm})";
}
}//eoc
}//eons