Skip to content

Commit ce118e4

Browse files
authored
Merge pull request #42 from kpfefferle/luxon-take-3
2 parents 248148f + 8050787 commit ce118e4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/legacy-table.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ module.exports = CoreObject.extend({
3838
let value = revision[key.name] ? revision[key.name] : "";
3939

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

lib/scm-table.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ module.exports = CoreObject.extend({
7171

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

0 commit comments

Comments
 (0)