[webkit-dev] Re: [webkit-changes] cvs commit: JavaScriptCore/kjs
date_object.cpp
David Harrison
harrison at apple.com
Tue Oct 4 10:16:44 PDT 2005
Sounds like fine comments to have in the code, not just the changelog.
Dave
On Oct 3, 2005, at 10:24 PM, Maciej Stachowiak wrote:
>
> On Oct 3, 2005, at 9:14 PM, George Staikos wrote:
>
>>
>> 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..)
>
> This is a merge to a branch of a fix from way back (well, 8/11,
> almost two months ago). It has been on TOT a long time. The mktime
> man page implies that if the tm_isdst field is set and nonnegative,
> it overrides the actual DST for that time. This patch attempts to
> emulate this quirk for the CoreFoundation time function case. The
> higher-level code that calls mktime counts on this quirk.
>
> Now, maybe that code was always wrong - I dunno. I'm not sure which
> other fix of yours you have in mind.
>
> Regards,
> Maciej
>
>
>>
>> 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/
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev at opendarwin.org
>> http://www.opendarwin.org/mailman/listinfo/webkit-dev
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at opendarwin.org
> http://www.opendarwin.org/mailman/listinfo/webkit-dev
More information about the webkit-dev
mailing list