mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 21:21:19 +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) {
|
if (time) {
|
||||||
dateTime = moment(`${date} ${time}`, this.dateTimeFormat).utc();
|
dateTime = moment(`${date} ${time}`, this.dateTimeFormat).utc();
|
||||||
} else {
|
} else {
|
||||||
dateTime = moment(date, this.dateFormat).utc();
|
dateTime = moment(date, this.dateFormat).startOf("day");
|
||||||
}
|
}
|
||||||
|
|
||||||
let toDateTime;
|
let toDateTime;
|
||||||
if (toTime) {
|
if (toTime) {
|
||||||
toDateTime = moment(`${toDate} ${toTime}`, this.dateTimeFormat).utc();
|
toDateTime = moment(`${toDate} ${toTime}`, this.dateTimeFormat).utc();
|
||||||
} else {
|
} else {
|
||||||
toDateTime = moment(toDate, this.dateFormat).utc();
|
toDateTime = moment(toDate, this.dateFormat).endOf("day");
|
||||||
}
|
}
|
||||||
|
|
||||||
let config = {
|
let config = {
|
||||||
|
Reference in New Issue
Block a user