Jsoneditor: Why is the toISOString method called when the value is a timestamp

Created on 20 Dec 2019  路  3Comments  路  Source: josdejong/jsoneditor

When the value is a time stamp, why the toISOString method is called makes me misunderstand the prompt, because it's not my current time zone
this.dom.date.innerHTML = new Date(value).toISOString(); this.dom.date.title = new Date(value).toString();

question

All 3 comments

What the preferred output is, local time or UTC, may differ per application. We could discuss what would be the best default (currently this is UTC). In any case, since the recently released v8.0.0 you can customize how the date is formatted, see option timestampFormat.

thanks.this is a good idea.I believe highly configurable will make users like it more

thanks.this is a good idea.I believe highly configurable will make users like it more

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fyyyyy picture fyyyyy  路  8Comments

guiferrpereira picture guiferrpereira  路  6Comments

sergibondarenko picture sergibondarenko  路  4Comments

mashaalmemon picture mashaalmemon  路  7Comments

fykcz picture fykcz  路  4Comments