| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 #endif | 95 #endif |
| 96 | 96 |
| 97 #if HAVE(SYS_TIME_H) | 97 #if HAVE(SYS_TIME_H) |
| 98 #include <sys/time.h> | 98 #include <sys/time.h> |
| 99 #endif | 99 #endif |
| 100 | 100 |
| 101 #if HAVE(SYS_TIMEB_H) | 101 #if HAVE(SYS_TIMEB_H) |
| 102 #include <sys/timeb.h> | 102 #include <sys/timeb.h> |
| 103 #endif | 103 #endif |
| 104 | 104 |
| 105 #if OS(QNX) | |
| 106 // qnx6 defines timegm in nbutil.h | |
| 107 #include <nbutil.h> | |
| 108 #endif | |
| 109 | |
| 110 using namespace WTF; | 105 using namespace WTF; |
| 111 | 106 |
| 112 namespace WTF { | 107 namespace WTF { |
| 113 | 108 |
| 114 /* Constants */ | 109 /* Constants */ |
| 115 | 110 |
| 116 static const double minutesPerDay = 24.0 * 60.0; | 111 static const double minutesPerDay = 24.0 * 60.0; |
| 117 static const double secondsPerDay = 24.0 * 60.0 * 60.0; | 112 static const double secondsPerDay = 24.0 * 60.0 * 60.0; |
| 118 static const double secondsPerYear = 24.0 * 60.0 * 60.0 * 365.0; | 113 static const double secondsPerYear = 24.0 * 60.0 * 60.0 * 365.0; |
| 119 | 114 |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 | 1088 |
| 1094 stringBuilder.append(utcOffset > 0 ? '+' : '-'); | 1089 stringBuilder.append(utcOffset > 0 ? '+' : '-'); |
| 1095 int absoluteUTCOffset = abs(utcOffset); | 1090 int absoluteUTCOffset = abs(utcOffset); |
| 1096 stringBuilder.append(twoDigitStringFromNumber(absoluteUTCOffset / 60)); | 1091 stringBuilder.append(twoDigitStringFromNumber(absoluteUTCOffset / 60)); |
| 1097 stringBuilder.append(twoDigitStringFromNumber(absoluteUTCOffset % 60)); | 1092 stringBuilder.append(twoDigitStringFromNumber(absoluteUTCOffset % 60)); |
| 1098 | 1093 |
| 1099 return stringBuilder.toString(); | 1094 return stringBuilder.toString(); |
| 1100 } | 1095 } |
| 1101 | 1096 |
| 1102 } // namespace WTF | 1097 } // namespace WTF |
| OLD | NEW |