Skip to content

Commit

Permalink
Merge 0fef7c9 into 701ca80
Browse files Browse the repository at this point in the history
  • Loading branch information
Kornel Kiełczewski committed Jul 19, 2016
2 parents 701ca80 + 0fef7c9 commit 8297ad9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: node_js
before_install:
- npm install -g npm
- npm cache clear
- npm install -g gulp
node_js:
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/TaskFileListComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ var TaskFileListComponent = React.createClass({
return lazy(files)
.sortBy(app => app[sortKey], state.sortDescending)
.map(file => {
var lastModifiedDate = new Date(file.mtime);
var lastModifiedDate = new Date(file.mtime * 1000);
var lastModifiedIsoString = lastModifiedDate.toISOString();
return (
<tr key={file.path}>
Expand Down
6 changes: 3 additions & 3 deletions src/test/units/TaskFileListComponent.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("TaskFileListComponent", function () {
files: [{
gid: "staff",
mode: "-rw-r--r--",
mtime: 1449573729,
mtime: 1000,
nlink: 1,
path: "/file/path/filename",
size: 506,
Expand Down Expand Up @@ -118,9 +118,9 @@ describe("TaskFileListComponent", function () {
var firstTableRow = this.component.find("tbody").find("tr").first();
var mtimeCell = firstTableRow.find("td").at(6);
expect(mtimeCell.text())
.to.equal(new Date(1449573729).toLocaleString());
.to.equal(new Date(1000 * 1000).toLocaleString());
expect(mtimeCell.find("time").props().dateTime)
.to.equal("1970-01-17T18:39:33.729Z");
.to.equal("1970-01-01T00:16:40.000Z");
});

});

0 comments on commit 8297ad9

Please sign in to comment.