mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 02:51:14 +08:00
FIX: removes UTC conversion when date and no time
This commit is contained in:
@ -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 = {
|
||||
|
Reference in New Issue
Block a user