Date-times and time-stamps

Document Information

GSC Classification OFFICIAL
Access Policy Open
Reference bps28576-2019-10
Alt. Reference
Document Status Current
Primary Classification
Author Organisation Government Digital Service
Sponsor OrganisationNot Known
Trustee NPTC Standards Working Group, trustee@standards.police.uk

Copyright Notice Copyright (c) 2016 National Police Technology Council (NPTC) group and the persons identified as the document authors. All rights reserved.

Abstract

Use ISO 8601 for dates and times where machine readability is the main concern. This includes use in - + APIs + data exchanges such as metadata in documents and websites + date sorting, for example, at the start of some filenames ISO 8601 does not apply when human readability is the main concern. For example, dates and times added within the text of a document.

Usage

Use ISO 8601 to the level of accuracy you require when a date or date and time is being recorded or exchanged in an IT system. List date and time elements in descending order of size (years, months, days, hours, minutes, seconds, milliseconds, and microseconds). This profile is based on the assumption that you’re using local time. A Coordinated Universal Time (UTC) offset may be added. For example, 2017-05-16T10:30:56+01:00 shows the instant of the 16 May 2017 at 30 minutes and 56 seconds past 10am. The offset in this example is British summer time (BST), one hour ahead of UTC. The standard’s format has a fixed number of digits padded with leading zeros to support different levels of accuracy. The lowest level is four digits to represent a year, and as you increase accuracy by adding the month, week or day the digits replace the zero padding. When using a less accurate date, include hyphen separators to avoid user confusion, for example, separate the digits for the year and the month - YYYY-MM. If required, separate time from the date by a ‘T’ character and record in a 24-hour format with 2 digits per element. The time format uses a ‘:’ separator between hours and minutes.

Normative References

bps28576-2019-10 link

Changelog

Approvals

DateApproverOrganisationEmailComments
2019-12-01Open Standards BoardGovernment Digital Service - Open Standards Board

Obsoleted By

Obsoletes

Collections

NameStatus
Standards | GDS IntegrationActive

Discussions

We’d love you to discuss this item but please be aware that these discussions are publicly accessible.