Skip to content

Commit

Permalink
FIX: removes UTC conversion when date and no time
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaffeux committed Jul 5, 2018
1 parent dc04892 commit 6e3a219
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -100,14 +100,14 @@ export default Ember.Component.extend({
if (time) {
dateTime = moment(`${date} ${time}`, this.dateTimeFormat).utc();
} else {
dateTime = moment(date, this.dateFormat).utc();
dateTime = moment(date, this.dateFormat).startOf("day");
}

let toDateTime;
if (toTime) {
toDateTime = moment(`${toDate} ${toTime}`, this.dateTimeFormat).utc();
} else {
toDateTime = moment(toDate, this.dateFormat).utc();
toDateTime = moment(toDate, this.dateFormat).endOf("day");
}

let config = {
Expand Down

1 comment on commit 6e3a219

@discoursebot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/local-dates-displaying-incorrectly/91597/4

Please sign in to comment.