| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) | 2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) |
| 3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2009 Google Inc. All rights reserved. | 4 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 5 * Copyright (C) 2007-2009 Torch Mobile, Inc. | 5 * Copyright (C) 2007-2009 Torch Mobile, Inc. |
| 6 * Copyright (C) 2010 &yet, LLC. (nate@andyet.net) | 6 * Copyright (C) 2010 &yet, LLC. (nate@andyet.net) |
| 7 * | 7 * |
| 8 * The Original Code is Mozilla Communicator client code, released | 8 * The Original Code is Mozilla Communicator client code, released |
| 9 * March 31, 1998. | 9 * March 31, 1998. |
| 10 * | 10 * |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 #include <algorithm> | 82 #include <algorithm> |
| 83 #include <limits.h> | 83 #include <limits.h> |
| 84 #include <limits> | 84 #include <limits> |
| 85 #include <math.h> | 85 #include <math.h> |
| 86 #include <stdlib.h> | 86 #include <stdlib.h> |
| 87 #include <time.h> | 87 #include <time.h> |
| 88 #include "wtf/text/StringBuilder.h" | 88 #include "wtf/text/StringBuilder.h" |
| 89 | 89 |
| 90 #if OS(WIN) | 90 #if OS(WIN) |
| 91 #include <windows.h> | 91 #include <windows.h> |
| 92 #endif | 92 #else |
| 93 | |
| 94 #if HAVE(SYS_TIME_H) | |
| 95 #include <sys/time.h> | 93 #include <sys/time.h> |
| 96 #endif | 94 #endif |
| 97 | 95 |
| 98 using namespace WTF; | 96 using namespace WTF; |
| 99 | 97 |
| 100 namespace WTF { | 98 namespace WTF { |
| 101 | 99 |
| 102 /* Constants */ | 100 /* Constants */ |
| 103 | 101 |
| 104 static const double hoursPerDay = 24.0; | 102 static const double hoursPerDay = 24.0; |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 } | 827 } |
| 830 | 828 |
| 831 double convertToLocalTime(double ms) | 829 double convertToLocalTime(double ms) |
| 832 { | 830 { |
| 833 double utcOffset = calculateUTCOffset(); | 831 double utcOffset = calculateUTCOffset(); |
| 834 double dstOffset = calculateDSTOffset(ms, utcOffset); | 832 double dstOffset = calculateDSTOffset(ms, utcOffset); |
| 835 return (ms + utcOffset + dstOffset); | 833 return (ms + utcOffset + dstOffset); |
| 836 } | 834 } |
| 837 | 835 |
| 838 } // namespace WTF | 836 } // namespace WTF |
| OLD | NEW |