Module: wine Branch: master Commit: 501ac4d496e9fb10fab3ec7c891ae2ce530e2b94 URL: https://gitlab.winehq.org/wine/wine/-/commit/501ac4d496e9fb10fab3ec7c891ae2c...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Dec 19 16:37:25 2022 +0100
ntdll: Match a timezone change happening at 23:59:59 with the following day.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53595
---
dlls/ntdll/unix/system.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index b9be2f53752..b9762fd278f 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -2039,6 +2039,11 @@ static BOOL match_tz_date( const RTL_SYSTEM_TIME *st, const RTL_SYSTEM_TIME *reg if (!reg_st->wYear) /* date in a day-of-week format */ wDay = weekday_to_mday(st->wYear - 1900, reg_st->wDay, reg_st->wMonth - 1, reg_st->wDayOfWeek);
+ /* special case for 23:59:59.999, match with 0:00:00.000 on the following day */ + if (!reg_st->wYear && reg_st->wHour == 23 && reg_st->wMinute == 59 && + reg_st->wSecond == 59 && reg_st->wMilliseconds == 999) + return (st->wDay == wDay + 1 && !st->wHour && !st->wMinute && !st->wSecond && !st->wMilliseconds); + return (st->wDay == wDay && st->wHour == reg_st->wHour && st->wMinute == reg_st->wMinute &&