Ignore:
Timestamp:
Mar 14, 2007, 8:23:56 PM (18 years ago)
Author:
kmccullo
Message:

Reviewed by .

  • Fixed a build breakage.
  • kjs/DateMath.cpp:
  • kjs/date_object.cpp: (KJS::formatLocaleDate): (KJS::DateObjectImp::construct):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/date_object.cpp

    r20004 r20204  
    165165    // Offset year if needed
    166166    struct tm localTM = gdt;
    167     int year = gdt.year + 1900;
    168     bool yearNeedsOffset = year < 1900 || year > 2038;
    169     if (yearNeedsOffset) {
    170         localTM.tm_year = equivalentYearForDST(year) - 1900;
    171      }
     167    localTM.tm_year = equivalentYearForDST(gdt.year + 1900) - 1900;
    172168 
    173169    // Do the formatting
     
    619615
    620616  if (numArgs == 0) { // new Date() ECMA 15.9.3.3
    621 #if PLATFORM(WIN_OS)
    622 #if COMPILER(BORLAND)
    623     struct timeb timebuffer;
    624     ftime(&timebuffer);
    625 #else
    626     struct _timeb timebuffer;
    627     _ftime(&timebuffer);
    628 #endif
    629     double utc = timebuffer.time * msPerSecond + timebuffer.millitm;
    630 #else
    631     struct timeval tv;
    632     gettimeofday(&tv, 0);
    633     double utc = floor(tv.tv_sec * msPerSecond + tv.tv_usec / 1000);
    634 #endif
    635     value = utc;
     617    value = getCurrentUTCTime();
    636618  } else if (numArgs == 1) {
    637619    if (args[0]->isObject(&DateInstance::info))
Note: See TracChangeset for help on using the changeset viewer.