Changeset 45908 in webkit
- Timestamp:
- Jul 15, 2009 7:18:38 AM (15 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r45907 r45908 1 2009-07-15 Laszlo Gombos <laszlo.1.gombos@nokia.com> 2 3 Reviewed by Dave Kilzer. 4 5 Turn off non-portable date manipulations for SYMBIAN 6 https://bugs.webkit.org/show_bug.cgi?id=27064 7 8 Introduce HAVE(TM_GMTOFF), HAVE(TM_ZONE) and HAVE(TIMEGM) guards 9 and place the rules for controlling the guards in Platform.h. 10 Turn off these newly introduced guards for SYMBIAN. 11 12 * wtf/DateMath.cpp: 13 (WTF::calculateUTCOffset): 14 * wtf/DateMath.h: 15 (WTF::GregorianDateTime::GregorianDateTime): 16 (WTF::GregorianDateTime::operator tm): 17 * wtf/Platform.h: 18 1 19 2009-07-15 Norbert Leser <norbert.leser@nokia.com> 2 20 -
trunk/JavaScriptCore/wtf/DateMath.cpp
r44843 r45908 376 376 localt.tm_yday = 0; 377 377 localt.tm_isdst = 0; 378 #if PLATFORM(WIN_OS) || PLATFORM(SOLARIS) || COMPILER(RVCT) 378 #if HAVE(TM_GMTOFF) 379 localt.tm_gmtoff = 0; 380 #endif 381 #if HAVE(TM_ZONE) 382 localt.tm_zone = 0; 383 #endif 384 385 #if HAVE(TIMEGM) 386 time_t utcOffset = timegm(&localt) - mktime(&localt); 387 #else 379 388 // Using a canned date of 01/01/2009 on platforms with weaker date-handling foo. 380 389 localt.tm_year = 109; 381 390 time_t utcOffset = 1230768000 - mktime(&localt); 382 #else383 localt.tm_zone = 0;384 localt.tm_gmtoff = 0;385 time_t utcOffset = timegm(&localt) - mktime(&localt);386 391 #endif 387 392 -
trunk/JavaScriptCore/wtf/DateMath.h
r44508 r45908 110 110 , isDST(inTm.tm_isdst) 111 111 { 112 #if !PLATFORM(WIN_OS) && !PLATFORM(SOLARIS) && !COMPILER(RVCT)112 #if HAVE(TM_GMTOFF) 113 113 utcOffset = static_cast<int>(inTm.tm_gmtoff); 114 #else 115 utcOffset = static_cast<int>(getUTCOffset() / msPerSecond + (isDST ? secondsPerHour : 0)); 116 #endif 114 117 118 #if HAVE(TM_ZONE) 115 119 int inZoneSize = strlen(inTm.tm_zone) + 1; 116 120 timeZone = new char[inZoneSize]; 117 121 strncpy(timeZone, inTm.tm_zone, inZoneSize); 118 122 #else 119 utcOffset = static_cast<int>(getUTCOffset() / msPerSecond + (isDST ? secondsPerHour : 0));120 123 timeZone = 0; 121 124 #endif … … 137 140 ret.tm_isdst = isDST; 138 141 139 #if !PLATFORM(WIN_OS) && !PLATFORM(SOLARIS) && !COMPILER(RVCT)142 #if HAVE(TM_GMTOFF) 140 143 ret.tm_gmtoff = static_cast<long>(utcOffset); 144 #endif 145 #if HAVE(TM_ZONE) 141 146 ret.tm_zone = timeZone; 142 147 #endif -
trunk/JavaScriptCore/wtf/Platform.h
r45793 r45908 406 406 #endif 407 407 408 #if !PLATFORM(WIN_OS) && !PLATFORM(SOLARIS) && !PLATFORM(SYMBIAN) && !COMPILER(RVCT) 409 #define HAVE_TM_GMTOFF 1 410 #define HAVE_TM_ZONE 1 411 #define HAVE_TIMEGM 1 412 #endif 413 408 414 #if PLATFORM(DARWIN) 409 415
Note: See TracChangeset
for help on using the changeset viewer.