mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[Awake]Fix crash on negative timezone offsets (#25393)
* [Awake]Fix crash on negative timezone offsets * fix spellchecker
This commit is contained in:
@@ -37,7 +37,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
KeepDisplayOn = Properties.KeepDisplayOn,
|
||||
IntervalMinutes = Properties.IntervalMinutes,
|
||||
IntervalHours = Properties.IntervalHours,
|
||||
ExpirationDateTime = Properties.ExpirationDateTime,
|
||||
|
||||
// Fix old buggy default value that might be saved in Settings. Some components don't deal well with negative time zones and minimum time offsets.
|
||||
ExpirationDateTime = Properties.ExpirationDateTime.Year < 2 ? DateTimeOffset.Now : Properties.ExpirationDateTime,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user