mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 03:01:22 +08:00
FIX: end date of ranges in html preview was incorrect (#9654)
This commit also remove an unused block of code as previewedTimezones can't be empty anymore.
This commit is contained in:
@ -113,22 +113,16 @@ export default class LocalDateBuilder {
|
||||
previewedTimezones.push({
|
||||
timezone: this._zoneWithoutPrefix(timezone),
|
||||
formated: this._createDateTimeRange(
|
||||
localDate.datetimeWithZone(timezone),
|
||||
DateWithZoneHelper.fromDatetime(
|
||||
localDate.datetime,
|
||||
localDate.timezone,
|
||||
timezone
|
||||
),
|
||||
this.time
|
||||
)
|
||||
});
|
||||
});
|
||||
|
||||
if (!previewedTimezones.length) {
|
||||
previewedTimezones.push({
|
||||
timezone: "UTC",
|
||||
formated: this._createDateTimeRange(
|
||||
localDate.datetimeWithZone("Etc/UTC"),
|
||||
this.time
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
return previewedTimezones.uniqBy("timezone");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user