Changeset 95401 in webkit
- Timestamp:
- Sep 18, 2011 10:34:39 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r95396 r95401 1 2011-09-18 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Web Inspector: chromium-win: "Save timeline data" does nothing. 4 https://bugs.webkit.org/show_bug.cgi?id=68313 5 6 windows shell API function GetSaveFileName doesn't accept file names with ':' symbol. 7 8 Reviewed by Pavel Feldman. 9 10 * inspector/front-end/TimelinePanel.js: 11 (WebInspector.TimelineModel.prototype._saveToFile): 12 1 13 2011-09-18 Dan Bernstein <mitz@apple.com> 2 14 -
trunk/Source/WebCore/inspector/front-end/TimelinePanel.js
r95383 r95401 1351 1351 1352 1352 var now= new Date(); 1353 InspectorFrontendHost.saveAs("TimelineRawData-" + now.toRFC3339() + ".json", records.join(",\n")); 1353 var suggestedFileName = "TimelineRawData-" + now.toISO8601Compact() + ".json"; 1354 InspectorFrontendHost.saveAs(suggestedFileName, records.join(",\n")); 1354 1355 }, 1355 1356 -
trunk/Source/WebCore/inspector/front-end/utilities.js
r94754 r95401 536 536 } 537 537 538 Date.prototype.to RFC3339= function()538 Date.prototype.toISO8601Compact = function() 539 539 { 540 540 function leadZero(x) … … 542 542 return x > 9 ? x : '0' + x 543 543 } 544 var offset = Math.abs(this.getTimezoneOffset()); 545 var offsetString = Math.floor(offset / 60) + ':' + leadZero(offset % 60); 546 return this.getFullYear() + '-' + 547 leadZero(this.getMonth() + 1) + '-' + 544 return this.getFullYear() + 545 leadZero(this.getMonth() + 1) + 548 546 leadZero(this.getDate()) + 'T' + 549 leadZero(this.getHours()) + ':' + 550 leadZero(this.getMinutes()) + ':' + 551 leadZero(this.getSeconds()) + 552 (!offset ? "Z" : (this.getTimezoneOffset() > 0 ? '-' : '+') + offsetString); 547 leadZero(this.getHours()) + 548 leadZero(this.getMinutes()) + 549 leadZero(this.getSeconds()); 553 550 } 554 551
Note: See TracChangeset
for help on using the changeset viewer.