Fix timezone month being reported incorrectly to games (#861)
Nintendo actually uses range from 1 to 12 for months (when original timezone code manage 0-11)
This commit is contained in:
parent
40039c5631
commit
f617fb542a
1 changed files with 4 additions and 2 deletions
|
@ -1707,7 +1707,8 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
||||||
Time = new CalendarTime()
|
Time = new CalendarTime()
|
||||||
{
|
{
|
||||||
Year = (short)calendarTime.Year,
|
Year = (short)calendarTime.Year,
|
||||||
Month = calendarTime.Month,
|
// NOTE: Nintendo's month range is 1-12, internal range is 0-11.
|
||||||
|
Month = (sbyte)(calendarTime.Month + 1),
|
||||||
Day = calendarTime.Day,
|
Day = calendarTime.Day,
|
||||||
Hour = calendarTime.Hour,
|
Hour = calendarTime.Hour,
|
||||||
Minute = calendarTime.Minute,
|
Minute = calendarTime.Minute,
|
||||||
|
@ -1724,7 +1725,8 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
||||||
CalendarTimeInternal calendarTimeInternal = new CalendarTimeInternal()
|
CalendarTimeInternal calendarTimeInternal = new CalendarTimeInternal()
|
||||||
{
|
{
|
||||||
Year = calendarTime.Year,
|
Year = calendarTime.Year,
|
||||||
Month = calendarTime.Month,
|
// NOTE: Nintendo's month range is 1-12, internal range is 0-11.
|
||||||
|
Month = (sbyte)(calendarTime.Month - 1),
|
||||||
Day = calendarTime.Day,
|
Day = calendarTime.Day,
|
||||||
Hour = calendarTime.Hour,
|
Hour = calendarTime.Hour,
|
||||||
Minute = calendarTime.Minute,
|
Minute = calendarTime.Minute,
|
||||||
|
|
Loading…
Reference in a new issue