ICU: Fix dates in the future, avoid returning B_ERROR

Change-Id: I51a2ead9484f4ac1affd8baf4f94c6984db26070
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8387
Reviewed-by: humdinger humdinger <humdinger@mailbox.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Niklas Poslovski 2024-10-06 18:21:15 +02:00 committed by waddlesplash
parent a7a4f17d60
commit 0076659590

View File

@ -253,13 +253,10 @@ ICUTimeConversion::_FillTmValues(const TimeZone* icuTimeZone,
if (!U_SUCCESS(icuStatus))
return B_ERROR;
if (tmOut->tm_gmtoff == -*fDataBridge->addrOfTimezone) {
tmOut->tm_zone = fDataBridge->addrOfTZName[tmOut->tm_isdst ? 1 : 0];
} else if (tmOut->tm_gmtoff == 0) {
if (tmOut->tm_gmtoff == 0)
tmOut->tm_zone = (char*)"GMT";
} else {
return B_ERROR;
}
else
tmOut->tm_zone = fDataBridge->addrOfTZName[tmOut->tm_isdst ? 1 : 0];
return B_OK;
}