Commit eddb0571 authored by kmccullo's avatar kmccullo
Browse files

Reviewed by .

        - Fixed one more build breakage

        * kjs/date_object.cpp:
        (KJS::formatLocaleDate):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e4255dd9
2007-03-14 Kevin McCullough <kmccullough@apple.com>
Reviewed by .
- Fixed one more build breakage
* kjs/date_object.cpp:
(KJS::formatLocaleDate):
2007-03-14 Kevin McCullough <kmccullough@apple.com>
 
Reviewed by .
......
......@@ -164,7 +164,11 @@ static JSCell* formatLocaleDate(const GregorianDateTime& gdt, const LocaleDateTi
// Offset year if needed
struct tm localTM = gdt;
localTM.tm_year = equivalentYearForDST(gdt.year + 1900) - 1900;
int year = gdt.year + 1900;
bool yearNeedsOffset = year < 1900 || year > 2038;
if (yearNeedsOffset) {
localTM.tm_year = equivalentYearForDST(year) - 1900;
}
// Do the formatting
const int bufsize=128;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment