mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +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:
parent
c99ecba68f
commit
2f714c7412
2 changed files with 50 additions and 15 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue