diff options
author | Nicolas Abram <abramlujan@gmail.com> | 2024-05-02 08:33:28 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-02 13:33:28 +0200 |
commit | ab12fbe9634623b20ae82ee1a2cbb35b9db68fd3 (patch) | |
tree | 24dc87bce60060743188050df8abfcf2227d9486 | |
parent | d0cc13ce0b2a149c3d19aa58a2f12ddc6cc0196f (diff) |
Fix system dateTime loading in avalonia LoadCurrentConfiguration (#6676)1.1.1297
* Fix system dateTime loading in avalonia LoadCurrentConfiguration
* Rename local var to not use upper camel case
-rw-r--r-- | src/Ryujinx/UI/ViewModels/SettingsViewModel.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs index 0664f436..0f43d0f7 100644 --- a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs @@ -412,10 +412,11 @@ namespace Ryujinx.Ava.UI.ViewModels Language = (int)config.System.Language.Value; TimeZone = config.System.TimeZone; - DateTime currentDateTime = DateTime.Now; - + DateTime currentHostDateTime = DateTime.Now; + TimeSpan systemDateTimeOffset = TimeSpan.FromSeconds(config.System.SystemTimeOffset); + DateTime currentDateTime = currentHostDateTime.Add(systemDateTimeOffset); CurrentDate = currentDateTime.Date; - CurrentTime = currentDateTime.TimeOfDay.Add(TimeSpan.FromSeconds(config.System.SystemTimeOffset)); + CurrentTime = currentDateTime.TimeOfDay; EnableVsync = config.Graphics.EnableVsync; EnableFsIntegrityChecks = config.System.EnableFsIntegrityChecks; |