Changeset 10655 in webkit for trunk/JavaScriptCore
- Timestamp:
- Sep 28, 2005, 6:55:11 PM (20 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r10654 r10655 1 2005-09-28 Geoffrey Garen <[email protected]> 2 3 - Fixed <rdar://problem/4275206> Denver Regression: Seed: Past Editions of Opinions display 4 "NAN/Undefined" for www.washingtonpost.com 5 6 Reviewed by darin. 7 8 * kjs/date_object.cpp: 9 (KJS::KRFCDate_parseDate): If the timezone isn't specified, rather than returning 10 invalidDate, substitute the local timezone. This matches the behavior of FF/IE. 11 1 12 2005-09-28 Maciej Stachowiak <[email protected]> 2 13 -
trunk/JavaScriptCore/kjs/date_object.cpp
r10571 r10655 387 387 } 388 388 389 static doubletimeZoneOffset(const struct tm *t)389 static long timeZoneOffset(const struct tm *t) 390 390 { 391 391 #if defined BSD || defined(__linux__) || defined(__APPLE__) … … 1092 1092 // 1093 1093 double result = -1; 1094 intoffset = 0;1094 long offset = 0; 1095 1095 bool have_tz = false; 1096 1096 char *newPosStr; … … 1301 1301 } 1302 1302 1303 // don't fail if the time zone is missing, some1304 // broken mail-/news-clients omit the time zone1305 1303 if (*dateString) { 1306 1304 if (strncasecmp(dateString, "GMT", 3) == 0 || … … 1345 1343 } 1346 1344 } 1347 // Bail out if we found an unknown timezone 1348 if (!have_tz) 1345 // If the time zone is missing or malformed, substitute the local time zone. 1346 // Some websites (4275206) omit the time zone. 1347 if (!have_tz) { 1348 time_t now; 1349 struct tm t; 1350 1351 time(&now); 1352 if (now == -1) 1349 1353 return invalidDate; 1354 1355 localtime_r(&now, &t); 1356 offset = -timeZoneOffset(&t); 1357 1358 have_tz = true; 1359 } 1350 1360 } 1351 1361 } … … 1385 1395 } 1386 1396 1387 result = ymdhms_to_seconds(year, month+1, day, hour, minute, second) - (offset *60);1397 result = ymdhms_to_seconds(year, month+1, day, hour, minute, second) - (offset * 60); 1388 1398 return result; 1389 1399 }
Note:
See TracChangeset
for help on using the changeset viewer.