logs-content: Changed adding adn editing to use browser's local time instead of UTC.
This commit is contained in:
@@ -21,7 +21,7 @@ module.exports = class {
|
||||
onInput(input) {
|
||||
if (input.post) {
|
||||
const {kind, nick, text} = input.post
|
||||
const time = moment.utc(input.post.time).format("YYYY-MM-DD HH:mm:ss")
|
||||
const time = moment(input.post.time).format("YYYY-MM-DD HH:mm:ss")
|
||||
|
||||
this.state.values = {time, kind, nick, text}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ module.exports = class {
|
||||
|
||||
const values = this.state.values
|
||||
|
||||
let time = new Date(values.time + " UTC")
|
||||
let time = new Date(values.time)
|
||||
if (Number.isNaN(time)) {
|
||||
this.state.error = `Could not parse ${values.time} as date`
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user