Skip to content

Commit

Permalink
Merge pull request #42 from kpfefferle/luxon-take-3
Browse files Browse the repository at this point in the history
  • Loading branch information
achambers authored Oct 27, 2020
2 parents 248148f + 8050787 commit ce118e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/legacy-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ module.exports = CoreObject.extend({
let value = revision[key.name] ? revision[key.name] : "";

if(key.name === 'timestamp') {
// ember-cli-deploy-revision-data uses ISO timestamps, so fall back to ISO if not milliseconds
let dt = typeof value === 'number' ? DateTime.fromMillis(value) : DateTime.fromISO(value);
// ember-cli-deploy-revision-data provides a JS Date object, so fall back to that if not milliseconds
let dt = typeof value === 'number' ? DateTime.fromMillis(value) : DateTime.fromJSDate(value);
value = dt.toFormat("yyyy/MM/dd HH:mm:ss");
}

Expand Down
4 changes: 2 additions & 2 deletions lib/scm-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ module.exports = CoreObject.extend({

if (this._isWide()) {
let { timestamp } = data;
// ember-cli-deploy-revision-data uses ISO timestamps, so fall back to ISO if not milliseconds
let dt = typeof timestamp === 'number' ? DateTime.fromMillis(timestamp) : DateTime.fromISO(timestamp);
// ember-cli-deploy-revision-data provides a JS Date object, so fall back to that if not milliseconds
let dt = typeof timestamp === 'number' ? DateTime.fromMillis(timestamp) : DateTime.fromJSDate(timestamp);
let value = dt.toFormat('yyyy/MM/dd HH:mm:ss');
row.push(value);
}
Expand Down

0 comments on commit ce118e4

Please sign in to comment.