mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-25 05:50:06 +00:00
Merge pull request #3334 from bunnei/time-fix
time: Fix month off-by-one error.
This commit is contained in:
commit
bc55c05947
@ -820,7 +820,7 @@ static ResultCode ToCalendarTimeImpl(const TimeZoneRule& rules, s64 time, Calend
|
|||||||
const ResultCode result{
|
const ResultCode result{
|
||||||
ToCalendarTimeInternal(rules, time, calendar_time, calendar.additiona_info)};
|
ToCalendarTimeInternal(rules, time, calendar_time, calendar.additiona_info)};
|
||||||
calendar.time.year = static_cast<s16>(calendar_time.year);
|
calendar.time.year = static_cast<s16>(calendar_time.year);
|
||||||
calendar.time.month = calendar_time.month;
|
calendar.time.month = calendar_time.month + 1; // Internal impl. uses 0-indexed month
|
||||||
calendar.time.day = calendar_time.day;
|
calendar.time.day = calendar_time.day;
|
||||||
calendar.time.hour = calendar_time.hour;
|
calendar.time.hour = calendar_time.hour;
|
||||||
calendar.time.minute = calendar_time.minute;
|
calendar.time.minute = calendar_time.minute;
|
||||||
@ -874,7 +874,7 @@ ResultCode TimeZoneManager::ToPosixTime(const TimeZoneRule& rules,
|
|||||||
|
|
||||||
CalendarTimeInternal internal_time{};
|
CalendarTimeInternal internal_time{};
|
||||||
internal_time.year = calendar_time.year;
|
internal_time.year = calendar_time.year;
|
||||||
internal_time.month = calendar_time.month;
|
internal_time.month = calendar_time.month - 1; // Internal impl. uses 0-indexed month
|
||||||
internal_time.day = calendar_time.day;
|
internal_time.day = calendar_time.day;
|
||||||
internal_time.hour = calendar_time.hour;
|
internal_time.hour = calendar_time.hour;
|
||||||
internal_time.minute = calendar_time.minute;
|
internal_time.minute = calendar_time.minute;
|
||||||
|
Loading…
Reference in New Issue
Block a user