mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 13:52:50 +08:00
FIX: removes UTC conversion when date and no time
This commit is contained in:
parent
dc04892a2d
commit
6e3a2197f8
|
@ -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 = {
|
||||
|
|
Loading…
Reference in New Issue
Block a user