1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-01 05:42:02 +00:00

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:
Thog 2020-01-09 01:08:57 +01:00 committed by jduncanator
parent 40039c5631
commit f617fb542a

View file

@ -1707,7 +1707,8 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
Time = new CalendarTime()
{
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,
Hour = calendarTime.Hour,
Minute = calendarTime.Minute,
@ -1724,7 +1725,8 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
CalendarTimeInternal calendarTimeInternal = new CalendarTimeInternal()
{
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,
Hour = calendarTime.Hour,
Minute = calendarTime.Minute,