litejs / json-lite

Fast non-blocking JSON viewer for Chrome and Firefox
195 stars 16 forks source link

Human friendly previews for timestamps #42

Closed sabi0 closed 5 years ago

sabi0 commented 5 years ago

JSON does not have a standard format for date / time representations. And they are often encoded as "Epoch" or Unix timestamp values: seconds or milliseconds since 0:00 January 1, 1970. Working with such "timestamp": 1547053639632 values is very inconvenient.

It would be great if the add-on was able to auto-detect numeric values that "might be a timestamp". And showed corresponding date and time next to it: "timestamp": 1547053639632, // 2019-01-09 17:07:19.632 UTC

This would save me so many trips to https://www.epochconverter.com/ every day.

lauriro commented 5 years ago

You can select numeric values, right click and select "JSON Lite" -> "Convert Time" -> "Timestamp to String" on any page

sabi0 commented 5 years ago

That's neat! But still requires three clicks and navigating 3-level menus. Whereas my suggestion would have zero friction.

lauriro commented 5 years ago

Option released in 19.1.0