Preferences/Time: Remove 32-bit UNIX time checks.
Change-Id: If974d441a932d54491024ba1a64688db513a57cb Reviewed-on: https://review.haiku-os.org/c/haiku/+/4330 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
a5061ecec5
commit
1764036b15
@@ -85,10 +85,8 @@ TTimeBaseView::ChangeTime(BMessage* message)
|
||||
if (message->FindInt32("month", &month) != B_OK)
|
||||
month = date.Month();
|
||||
|
||||
if (year >= 1970 && year <= 2037) {
|
||||
date.SetDate(year, month, day);
|
||||
dateTime.SetDate(date);
|
||||
}
|
||||
date.SetDate(year, month, day);
|
||||
dateTime.SetDate(date);
|
||||
}
|
||||
|
||||
set_real_time_clock(dateTime.Time_t());
|
||||
|
||||
@@ -669,12 +669,6 @@ TDateEdit::_CheckRange()
|
||||
break;
|
||||
|
||||
case B_DATE_ELEMENT_YEAR:
|
||||
// 2037 is the end of 32-bit UNIX time
|
||||
if (value > 2037)
|
||||
value = 2037;
|
||||
else if (value < 1970)
|
||||
value = 1970;
|
||||
|
||||
fDate.SetDate(value, fDate.Month(), fDate.Day());
|
||||
break;
|
||||
|
||||
@@ -713,7 +707,7 @@ TDateEdit::_IsValidDoubleDigit(int32 value)
|
||||
case B_DATE_ELEMENT_YEAR:
|
||||
{
|
||||
int32 year = int32(fHoldValue / 100) * 100 + value;
|
||||
if (year <= 2037 && year >= 1970)
|
||||
if (year >= 2000)
|
||||
isInRange = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user