Skip to content

Latest commit

 

History

History
43 lines (26 loc) · 1.76 KB

File metadata and controls

43 lines (26 loc) · 1.76 KB

most common json timestamp format

The most common JSON timestamp formats are:

  1. ISO 8601 Format: This is widely accepted and recommended for representing dates and times in JSON. It follows the pattern "YYYY-MM-DDTHH:mm:ss.sssZ", where:
    • "YYYY" represents the year.
    • "MM" represents the month.
    • "DD" represents the day.
    • "T" separates the date and time.
    • "HH" represents the hour.
    • "mm" represents the minute.
    • "ss" represents the second.
    • "sss" represents milliseconds.
    • "Z" indicates UTC time or includes a time zone offset (e.g., "+/-HH:mm")123.

Example: "2023-08-20T13:20:10.633Z"

  1. Unix Timestamp Format: This represents the number of seconds or milliseconds since January 1, 1970, 00:00:00 UTC. It is often used for efficient date manipulation and calculations124.

Example: 1699027592000 (milliseconds) or 1641043200 (seconds)

Both formats are widely used, but ISO 8601 is generally preferred for its readability and standardization across different systems.

Footnotes

  1. https://www.squash.io/how-to-choose-the-correct-json-date-format-in-javascript/ 2

  2. http://www.webdatarocks.com/doc/js/data-types-in-json/ 2

  3. https://docs.jsonata.org/date-time

  4. https://docs.newrelic.com/docs/logs/ui-data/timestamp-support/