misc: DateTimeOffset Extract extension from Gommon

This commit is contained in:
Evan Husted 2024-12-31 21:21:54 -06:00
parent 7c01633f13
commit 3fa714bb72
2 changed files with 4 additions and 5 deletions

View file

@ -466,11 +466,10 @@ namespace Ryujinx.Ava.UI.ViewModels
public void MatchSystemTime()
{
var dto = DateTimeOffset.Now;
CurrentDate = new DateTimeOffset(dto.Year, dto.Month, dto.Day, 0, 0, 0, dto.Offset);
(DateTimeOffset dto, TimeSpan timeOfDay) = DateTimeOffset.Now.Extract();
CurrentTime = dto.TimeOfDay;
CurrentDate = dto;
CurrentTime = timeOfDay;
OnPropertyChanged(nameof(CurrentDate));
OnPropertyChanged(nameof(CurrentTime));