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:
@@ -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
|
||||
Reference in New Issue
Block a user