[webkit-dev] Re: [webkit-changes] cvs commit: JavaScriptCore/kjs date_object.cpp

George Staikos staikos at kde.org
Mon Oct 3 21:14:12 PDT 2005


I'm guessing that this fixes the case of adding a value to a date and crossing 
the DST boundary.  At least prior to this patch it would be off by an hour.  
I posted a possible fix which seems to fix it for me and has been applied to 
KJS.  It's portable, and this is not.  Any reason why the portable one wasn't 
used, and is it possible to commit it also?  (assuming that this patch does 
what I think..)

On Monday 03 October 2005 18:44, Timothy wrote:
>                   * kjs/date_object.cpp:
>                   (timetUsingCF): Fix one of the date tests my making the
> CF version of mktime have the same quirk about the DST field as the real
> mktime. * tests/mozilla/expected.html: Updated for newly fixed test.
>
>   -
>   +
>        CFAbsoluteTime absoluteTime = CFGregorianDateGetAbsoluteTime(date,
> timeZone); +
>   +    if (tm->tm_isdst >= 0) {
>   +      if (CFTimeZoneIsDaylightSavingTime(timeZone, absoluteTime) &&
> !tm->tm_isdst) +        absoluteTime += 3600;
>   +      else if (!CFTimeZoneIsDaylightSavingTime(timeZone, absoluteTime)
> && tm->tm_isdst) +        absoluteTime -= 3600;
>   +    }
>   +
>        CFTimeInterval interval = absoluteTime +


-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/



More information about the webkit-dev mailing list