This is needed to convert JavaScript dates to AppleScript ones in WebCore.
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).
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.