WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
7107
Refactor Date object to provide direct access to milliseconds/offset
https://bugs.webkit.org/show_bug.cgi?id=7107
Summary
Refactor Date object to provide direct access to milliseconds/offset
Alexey Proskuryakov
Reported
2006-02-06 11:14:17 PST
This is needed to convert JavaScript dates to AppleScript ones in WebCore.
Attachments
proposed patch
(10.13 KB, patch)
2006-02-06 11:31 PST
,
Alexey Proskuryakov
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2006-02-06 11:31:18 PST
Created
attachment 6294
[details]
proposed patch While refactoring the code, I had to also make several Windows-specific changes. Apparently, the Windows _daylight global has a different meaning than seems to have been expected by GetTimezoneOffset implementation. In fact, _daylight is non-zero if the machine is configured to support daylight savings time, not when DST is active. In other words, there are two ways to make _daylight non-zero: 1) Tick "Automatically adjust clock for daylight saving changes" checkbox in Date and Time control panel - _daylight becomes 1 (the actual value is undocumented). 2) give TZ environment variable a value that includes a DST timezone. E.g.: set TZ=MSK3 -> _daylight=0 set TZ=MSK3MSD -> _daylight=77 (value depends on the timezone, also undocumented).
Darin Adler
Comment 2
2006-02-06 18:18:56 PST
Comment on
attachment 6294
[details]
proposed patch +static bool isTime_tSigned() +{ + time_t minusOne = (time_t)(-1); + return minusOne < 0; +} The above function should be marked inline, because if so it will act as a compile-time constant. If tested thoroughly, looks good, r=me.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug