Changeset 16798 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Oct 4, 2006, 6:42:00 PM (19 years ago)
Author:
kmccullo
Message:

Reviewed by Adam.

  • Removed an unnecessary assert that was stopping many pages. tm_gmtoff was not set for UTC time in mozilla but is always set for us.
  • kjs/DateMath.cpp: (KJS::getUTCOffset): (KJS::msToTM):
  • kjs/date_object.cpp: (KJS::gmtoffset): (KJS::formatTime):
Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r16797 r16798  
     12006-10-04  Kevin McCullough  <[email protected]>
     2
     3        Reviewed by Adam.
     4
     5        - Removed an unnecessary assert that was stopping many pages.  tm_gmtoff was not set for UTC time in mozilla but is always set for us.
     6
     7        * kjs/DateMath.cpp:
     8        (KJS::getUTCOffset):
     9        (KJS::msToTM):
     10        * kjs/date_object.cpp:
     11        (KJS::gmtoffset):
     12        (KJS::formatTime):
     13
    1142006-10-04  Geoffrey Garen  <[email protected]>
    215
  • trunk/JavaScriptCore/kjs/DateMath.cpp

    r16795 r16798  
    334334        ltime.tm_year = 70;
    335335
    336         #if !PLATFORM(WIN_OS)
     336#if !PLATFORM(WIN_OS)
    337337        ltime.tm_zone = 0;
    338338        ltime.tm_gmtoff = 0;
    339         #endif
     339#endif
    340340
    341341        utcOffset = mktime(&ltime) - (hoursPerDay * secondsPerHour);
     
    446446
    447447    //everyone else seems to have these fields
    448     #if !PLATFORM(WIN_OS)
     448#if !PLATFORM(WIN_OS)
    449449    struct tm xtm;
    450450    // FIXME: time_t has a potential problem in 2038
     
    453453    tm.tm_gmtoff = xtm.tm_gmtoff;
    454454    tm.tm_zone = xtm.tm_zone;
    455     #endif
     455#endif
    456456}
    457457
  • trunk/JavaScriptCore/kjs/date_object.cpp

    r16780 r16798  
    7070#if PLATFORM(WIN_OS)
    7171    // Time is supposed to be in the current timezone.
    72     return static_cast<int>(getUTCOffset()/1000.0);
     72    static int utcOffset = static_cast<int>(getUTCOffset()/1000.0);
     73    return utcOffset;
    7374#else
    7475    return t.tm_gmtoff;
     
    184185    char buffer[100];
    185186    if (utc) {
    186 #if !PLATFORM(WIN_OS)   //win doesn't have the tm_gtoff member
    187         ASSERT(t.tm_gmtoff == 0);
    188 #endif
    189187        snprintf(buffer, sizeof(buffer), "%02d:%02d:%02d GMT", t.tm_hour, t.tm_min, t.tm_sec);
    190188    } else {
Note: See TracChangeset for help on using the changeset viewer.