logs-content: Changed adding adn editing to use browser's local time instead of UTC.

This commit is contained in:
2018-09-30 16:10:31 +02:00
parent 3466b1a707
commit a098051733
3 changed files with 6 additions and 8 deletions
@@ -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