Ignore:
Timestamp:
Oct 23, 2006, 8:44:48 PM (19 years ago)
Author:
kmccullo
Message:

Reviewed by Maciej.

  • Makes the toTM function an operator. Was going to piggy back on a patch but the patch needs more work.
  • kjs/DateMath.cpp: (KJS::equivalentYearForDST):
  • kjs/DateMath.h: (KJS::GregorianDateTime::operator tm):
  • kjs/date_object.cpp: (KJS::formatTime): (KJS::DateProtoFunc::callAsFunction):
File:
1 edited

Legend:

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

    r17037 r17239  
    183183        int offset = abs(gmtoffset(t));
    184184        char tzname[70];
    185         struct ::tm gtm = t.toTM();
     185        struct tm gtm = t;
    186186        strftime(tzname, sizeof(tzname), "%Z", &gtm);
    187187
     
    481481#else
    482482  case ToLocaleString: {
    483     struct tm gtm = t.toTM();
     483    struct tm gtm = t;
    484484    strftime(timebuffer, bufsize, "%c", &gtm);
    485485    return jsString(timebuffer);
     
    487487    }
    488488  case ToLocaleDateString: {
    489     struct tm gtm = t.toTM();
     489    struct tm gtm = t;
    490490    strftime(timebuffer, bufsize, "%x", &gtm);
    491491    return jsString(timebuffer);
     
    493493    }
    494494  case ToLocaleTimeString: {
    495     struct tm gtm = t.toTM();
     495    struct tm gtm = t;
    496496    strftime(timebuffer, bufsize, "%X", &gtm);
    497497    return jsString(timebuffer);
Note: See TracChangeset for help on using the changeset viewer.