| Index: Source/wtf/DateMath.cpp
|
| diff --git a/Source/wtf/DateMath.cpp b/Source/wtf/DateMath.cpp
|
| index 1c901b712d3aee23be9ea78c6c68e416efcab2d2..1c585c090382e7536ffc9393607c2947abe209ac 100644
|
| --- a/Source/wtf/DateMath.cpp
|
| +++ b/Source/wtf/DateMath.cpp
|
| @@ -358,7 +358,7 @@ static int equivalentYearForDST(int year)
|
| return year;
|
| }
|
|
|
| -int32_t calculateUTCOffset()
|
| +static int32_t calculateUTCOffset()
|
| {
|
| #if OS(WIN)
|
| TIME_ZONE_INFORMATION timeZoneInformation;
|
| @@ -431,7 +431,7 @@ static double calculateDSTOffsetSimple(double localTimeSeconds, double utcOffset
|
| }
|
|
|
| // Get the DST offset, given a time in UTC
|
| -double calculateDSTOffset(double ms, double utcOffset)
|
| +static double calculateDSTOffset(double ms, double utcOffset)
|
| {
|
| // On Mac OS X, the call to localtime (see calculateDSTOffsetSimple) will return historically accurate
|
| // DST information (e.g. New Zealand did not have DST from 1946 to 1974) however the JavaScript
|
| @@ -881,4 +881,11 @@ String makeRFC2822DateString(unsigned dayOfWeek, unsigned day, unsigned month, u
|
| return stringBuilder.toString();
|
| }
|
|
|
| +double convertToLocalTime(double ms)
|
| +{
|
| + double utcOffset = calculateUTCOffset();
|
| + double dstOffset = calculateDSTOffset(ms, utcOffset);
|
| + return (ms + utcOffset + dstOffset);
|
| +}
|
| +
|
| } // namespace WTF
|
|
|