Standard Timestamp Format

From MediaWiki
Revision as of 18:44, 5 December 2023 by Rob (talk | contribs) (Created page with "Timestamps used in database import scripts and files are always rendered in [https://en.wikipedia.org/wiki/ISO_8601 ISO 8601] format. This creates timestamps in the form, <code>2010-10-21T17:01:22Z</code> for a date with time and <code>2010-10-21</code> for just a date. There are several benefits to this format: * MS Excel won't mangle it; * It sorts correctly; * The fields are unambiguous; * It is easy to parse with Python or R. All timestamps are converted into UTC f...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Timestamps used in database import scripts and files are always rendered in ISO 8601 format. This creates timestamps in the form, 2010-10-21T17:01:22Z for a date with time and 2010-10-21 for just a date.

There are several benefits to this format:

  • MS Excel won't mangle it;
  • It sorts correctly;
  • The fields are unambiguous;
  • It is easy to parse with Python or R.

All timestamps are converted into UTC from the original local time.