소스 검색

Fix system dateTime loading in avalonia LoadCurrentConfiguration (#6676)

* Fix system dateTime loading in avalonia LoadCurrentConfiguration

* Rename local var to not use upper camel case
Nicolas Abram 2 년 전
부모
커밋
ab12fbe963
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      src/Ryujinx/UI/ViewModels/SettingsViewModel.cs

+ 4 - 3
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;