mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FIX: ensures seconds are displayed when used with dates (#10170)
This commit is contained in:
parent
6d17765924
commit
b2a2e4f1e5
2 changed files with 17 additions and 7 deletions
|
@ -24,7 +24,7 @@ export default class LocalDateBuilder {
|
|||
|
||||
build() {
|
||||
const [year, month, day] = this.date.split("-").map(x => parseInt(x, 10));
|
||||
const [hour, minute] = (this.time || "")
|
||||
const [hour, minute, second] = (this.time || "")
|
||||
.split(":")
|
||||
.map(x => (x ? parseInt(x, 10) : undefined));
|
||||
|
||||
|
@ -42,6 +42,7 @@ export default class LocalDateBuilder {
|
|||
day,
|
||||
hour,
|
||||
minute,
|
||||
second,
|
||||
timezone: this.timezone,
|
||||
localTimezone: this.localTimezone
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue