ISO 8601 – Zeitangaben international sicher kommunizieren (2023)

Zeitangaben sind wichtig, wenn man Absprachen treffen und zusammenfinden möchte. In Zeiten der digitalen Globalisierung wird es aber immer schwieriger, Zeitangaben allgemein verständlich zu gestalten. Verschiedene Zeitzonen weltweit und unterschiedliche kulturelle Gewohnheiten der Zeitformatierung verkomplizieren die Angabe präziser und zuverlässiger Daten und Uhrzeiten über Ländergrenzen hinweg. ISO 8601 löst genau dieses Problem. Durch die Einigung auf diesen internationalen Standard können alle Akteure weltweit unmissverständliche Zeitabsprachen treffen.

Definition: ISO 8601

Der internationale Standard ISO 8601 gibt Empfehlungen für numerische Datumsformate und Zeitangaben.

Die vorhandenen Datenformate können Sie mithilfe von verschiedenen Tools oder per Skript in das gewünschte ISO-Date-Format konvertieren. In diesem Artikel erfahren Sie alles Wissenswerte über den genormten Standard für Zeitangaben.

Inhaltsverzeichnis

  1. Grundsätze der ISO-8601-Norm
  2. Vorteile des ISO-8601-Standards im Vergleich zu anderen gebräuchlichen Varianten
  3. Daten konvertieren

Domain Bundle Aktion

Nur für kurze Zeit: So erhalten Sie zwei Gratis-Domains!

Kaufen Sie eine .de-Domain und erhalten eine .com und .info Domain gratis dazu.

E-Mail-Postfach

Wildcard SSL

Persönlicher Berater

(Video) High Density 2022

Grundsätze der ISO-8601-Norm

Die ISO 8601 Norm definiert ein international anerkanntes Format zur Darstellung von Daten. Dieses wird durch die Schreibweise Stunden-Minuten-Sekunden ausgedrückt. Für Zeitangaben in größeren Dimensionen gilt es in der Form Jahr-Monat-Tag. Das Grundformat dieser Darstellung erlaubt es, die Ziffern unmittelbar hintereinander zu schreiben. Sie können aber zwecks Übersichtlichkeit auch durch Trennzeichen separiert werden. Im Grundformat von ISO 8601 hat das Datum „07. September 2019“ entsprechend folgende Schreibweise: „20190907“, oder in der Formatierung mit Trennzeichen ausgedrückt: „2019-09-07“. Uhrzeiten sind in Stunden, Minuten und Sekunden unterteilt. Die Darstellung in ISO 8601 ist also 12:07:22. Mit dieser Darstellung von ISO-Datenformaten (als ISO date formats bezeichnet) entfallen – zumindest in elektronischen Angaben – die länderspezifischen Schreibweisen. Angaben werden auf diese Weise vereinheitlicht, wodurch es zu weniger Irritationen kommt.

Die ISO-8601-Norm ist auch unter der Bezeichnung EN 28601 bekannt (Bezeichnung für EU-Normen). Sie wird zudem nicht nur zur Angabe von Zeitpunkten, sondern auch zur Angabe von Zeitspannen verwendet. In solchen Fällen ist das Startdatum oder die Startzeit mit dem Buchstaben „P” von der nachfolgenden Zeitspanne getrennt. Eine Zeitspanne, die am 6. September 2019 um 20:00 Uhr beginnt und einen Monat, 5 Tage und 3 Stunden andauert, sieht entsprechend der ISO-Vereinheitlichung folgendermaßen aus: 2019-09-06T20P1M5T3H.

Alle Angaben wie Zeiten, Daten oder Zeitspannen werden gemäß der ISO-Norm in einer bestimmten Reihenfolge dargestellt: Sie beginnen mit der größten Einheit und dann folgt immer die nächstkleinere. Diese Schreibweise ist auch als „fallende Schreibung” bekannt. Sie entspricht der natürlichen mathematischen Wertigkeit von Zahlen. Größere Einheiten sind also immer vor kleineren Einheiten geschrieben. Sie ist vorteilhaft, weil hierdurch die lexikografische und die chronologische Sortierung von Daten und Zeitangaben zum gleichen Ergebnis führen.

Tabellarische Darstellung der ISO-8601-Daten (ISO date)

(Video) Grundlagen der Informatik, Computernetze (Layer 4; TCP, einige Protokolle)
Darstellung nach ISO 8601 Wertebereiche
Jahr (J) JJJJ, vierstellig, gekürzt zweistellig
Monat (M) MM, 01 bis 12
Woche (W) WW, 01 bis 53
Tag (T) T, Tag der Woche, 1 bis 7
Stunde (h) hh, 00 bis 23, 24:00:00 als Endzeit
Minute (m) mm, 00 bis 59
Sekunde (s) ss, 00 bis 59
Dezimaler Bruchteil (f) Bruchteile von Sekunden, beliebige Genauigkeit

In allen Formaten der Norm sind die Werte für Daten oder Zeiten in verschiedene Einheiten untergliedert, z. B. Jahr, Monat, Tag, Stunde usw., wobei jede einzelne Einheit mit einer festen Ziffernzahl dargestellt ist. Besonders im naturwissenschaftlichen Bereich, der Software-Entwicklung und bei internationalen Korrespondenzen wird die Norm genutzt, um das Fehlerrisiko bei Zeitangaben zu senken. Der international standardisierte ISO-8601-Zeitstempel (ISO 8601 timestamp), verringert dieses Risiko deutlich.

Nach den Datums- und Zeitangaben ist zusätzlich oft die Differenz zu der anerkannten Weltzeit angegeben, abgekürzt mit UTC. So berücksichtigt das Format eventuelle Zeitzonenunterschiede oder landesspezifische Sommerzeiten. Als Wert wird hier in der Regel der Buchstabe „Z” verwendet.

Tabellarische Darstellung der ISO-8601-Daten mit Zeitzonenangaben

Beispiel Erklärung
2019-09-07T-15:50+00 15:50 am 07.09.2019 in der Zeitzone der Weltzeit
2019-09-07T15:50+00Z ebenfalls 15:50 am 07.09.2019 in der Zeitzone der Weltzeit mit Zusatz „Z” in der Schreibweise
2019-09-07T15:50+01:00 15:50 am 07.09.2019 in der Zeitzone Berlin (MEZ)

Wichtig zu beachten ist jedoch: Der Geltungsbereich der Jahreszahlen in diesem Format umfasst nur die Jahre von 1583 bis 9999. Das liegt daran, dass der gregorianische Kalender erst im Jahr 1583 eingeführt wurde. Es besteht trotzdem die Möglichkeit, ISO 8601 auch für Zeit- oder Datenangaben vor dem Jahr 1583 anzuwenden. Hierfür ist jedoch eine genaue Absprache zwischen den „Datenaustauschpartnern” notwendig, um Unstimmigkeiten zu vermeiden.

Vorteile des ISO-8601-Standards im Vergleich zu anderen gebräuchlichen Varianten

ISO 8601 spezifiziert nur numerische Notationen und deckt keine Daten und Zeiten ab, in denen Wörter in der Darstellung verwendet werden. Sie ist nicht als Ersatz für sprachabhängige Formulierungen wie „4. Februar 1995" gedacht. ISO 8601 sollte jedoch verwendet werden, um Bezeichnungen wie „2/4/95“ (US Schreibweise) und „9:30 Uhr“ zu ersetzen.

Die Vorteile der ISO-8601-Norm lassen sich folgendermaßen zusammenfassen:

(Video) WIESO MOVEMENT STATT KRAFTTRAINING?! FLACHRÜCKEN, LOW CARB & LOW FAT etc. LIVE Q&A
  • leicht les- und schreibbar durch Software
  • leicht vergleichbar und sortierbar durch einen einfachen Zeichenkettenvergleich
  • unabhängig von der Landessprache verständlich
  • kann nicht mit anderen gängigen Datumsbezeichnungen verwechselt werden
  • Übereinstimmung mit dem üblichen 24h-Zeit-Notensystem, bei dem die größeren Einheiten (Stunden) auch vor die kleineren (Minuten und Sekunden) gesetzt werden
  • Zeichenketten, die ein Datum gefolgt von einer Uhrzeit enthalten, sind ebenfalls leicht vergleichbar und sortierbar (z.B. „2019-09-07 20:15:00“)
  • Notation ist kurz und hat eine konstante Länge, was sowohl die Tastatureingabe als auch das Tabellenlayout erleichtert
  • identisch mit der chinesischen Datumsnotation, sodass die größte Kulturgruppe (>25 %) auf diesem Planeten bereits damit vertraut ist
  • Datumsangaben mit der Reihenfolge „Jahr, Monat, Tag" sind außerdem bereits weit verbreitet, z.B. in Japan, Korea, Ungarn, Schweden, Finnland, Dänemark und einigen anderen Ländern
  • eine vierstellige Jahresdarstellung führt nicht zu Problemen bei Jahrhundertwechseln

Daten konvertieren

Grundsätzlich kann das Format natürlich in zwei verschiedene Richtungen konvertiert werden. Zum einen kann ein Datum bzw. eine Zeitangabe aus der jeweiligen Landesform in die ISO-Norm konvertiert werden, zum anderen aber auch aus dem ISO-Format in die jeweilige Landessprache.

Beim Konvertieren aus dem ISO-Datum (ISO date) in eine „einfache” lesbare Form, sieht der ISO-8601-Timestamp normalerweise folgendermaßen aus:

String dateString = "2019-09-26T07:58:30.996+0200"

Dieser „String” ist nun in dem Datumsformat yyyy-MM-dd aufgebaut. Das Trennzeichen für die Zeit ist hierbei „T“ und das Format der Uhrzeit HH:mm:ss, plus dem UTC-Anhang .sssz. Das gesamte Format sieht also so aus: yyyy-MM-dd ‘T’ HH:mm:ss.SSSZ.

Die folgende Konvertierung soll das ISO-Datum nun in das allgemeine deutsche, bzw. uns geläufige Format überführen, also HH:mm, dd.MM.yyyy (Stunde, Minute – Tag, Monat, Jahr).

public String getOurDate() {DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");try { Date unformatedDate = format.parse(date); String formatedDate = new SimpleDateFormat("HH:mm dd.MM.yyyy").format(unformatedDate); return formatedDate; } catch (ParseException e){ System.out.println("Error") } return date;}

Tipp

Zusätzlich zu den manuellen Konvertierungsmöglichkeiten gibt es im Internet auch einige Websites, die die Daten automatisch in das jeweils gewünschte Format konvertieren. Zum Beispiel DenCode Converter. Dort wird einfach das Datum im vorhandenen Format eingegeben und dann ausgewählt, in welche Ausgabeformatierung es konvertiert werden soll. Auch die Zeitzone ist wählbar.

  • Web-Entwicklung

Ähnliche Artikel

ISO 8601 – Zeitangaben international sicher kommunizieren (2)

ISO 27001: Standardisierte Norm zur Informationssicherheit in Unternehmen

  • Sicherheit

Bei Einhaltung der ISO-27001-Norm wird Unternehmen ein sorgfältiger Umgang mit Informationen sowie das Vorhandensein von Plänen für Ausnahmefälle zugeschrieben. Öffentliche Zertifikate und Normen nach der ISO-Zertifizierung schaffen Vertrauen beim Kunden und bescheinigen dem Unternehmen eine sichere und geprüfte Datenhandhabung. Die Zertifizierung wird von einem unabhängigen Institut durchgeführt.

ISO 27001: Standardisierte Norm zur Informationssicherheit in Unternehmen

ISO 8601 – Zeitangaben international sicher kommunizieren (3)

Time-based One-time Password: TOTP erklärt

  • Sicherheit

Daten-Leaks und Hackerangriffe – Sicherheit im Internet spielt für Nutzer eine zunehmend wichtige Rolle. Standardpasswörter aus Namen und Geburtsjahren lassen sich binnen Sekunden knacken und geben Kriminellen Zugriff auf die verschiedensten Konten. TOTP in Kombination mit Multi-Faktor-Authentifizierung liefert Abhilfe: ein Passwort, nur für einen kurzen Augenblick gültig. Wie kann das…

Time-based One-time Password: TOTP erklärt

ISO 8601 – Zeitangaben international sicher kommunizieren (4)

One-Time Password (OTP) – Mehr Sicherheit im Netz

  • Sicherheit

Ob beim Online-Banking, Online-Einkauf oder Anmelden in Firmen-Netzwerken: Wer im World Wide Web unterwegs ist, muss ständig Passwörter benutzen. Leider sind diese oft nicht so sicher, wie sie eigentlich sein sollten. Eine Möglichkeit für besseren Schutz ist ein sogenanntes One-Time Password (OTP). In unserem Artikel erfahren Sie, was man darunter versteht und warum es auch für Sie interessant…

One-Time Password (OTP) – Mehr Sicherheit im Netz

ISO 8601 – Zeitangaben international sicher kommunizieren (5)

Was ist ISO? ISO-Norm und Zertifizierung erklärt

  • KnowHow

Eine ISO-Norm steht für die Normung von Qualität und Sicherheit in allen Bereich, abgesehen von Elektrik und Elektronik. Das betrifft u.a. Produkte, Dienstleistungen, Managementsysteme sowie Soft- und Hardware. ISO-Zertifizierungen garantieren in diesen Bereichen, dass aktuelle ISO-Anforderungen erfüllt werden. Alles zu Entwicklung und Zertifizierung erfahren Sie hier.

Was ist ISO? ISO-Norm und Zertifizierung erklärt

FAQs

What is ISO 8601 date format example? ›

ISO 8601 represents date and time by starting with the year, followed by the month, the day, the hour, the minutes, seconds and milliseconds. For example, 2020-07-10 15:00:00.000, represents the 10th of July 2020 at 3 p.m. (in local time as there is no time zone offset specified—more on that below).

What is Z in ISO 8601 date format? ›

The Z suffix in the ISO 8601 time representation is sometimes referred to as "Zulu time" or "Zulu meridian" because the same letter is used to designate the Zulu time zone.

How to convert ISO 8601 string to date in Java? ›

String dateTimeString = "2022-07-28T13:14:15.123+01:00"; SimpleDateFormat isoFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss. SSSXXX"); Date date = isoFormat. parse(dateTimeString); This will parse the ISO 8601-compliant string into a Date object.

What is the TZ format for date? ›

The T is just a literal to separate the date from the time, and the Z means “zero hour offset” also known as “Zulu time” (UTC). If your strings always have a “Z” you can use: SimpleDateFormat format = new SimpleDateFormat( “yyyy-MM-dd'T'HH:mm:ss).

What is ISO 8601 format today? ›

What is UTC Time in ISO-8601 Format? Current time: 18:42:22 UTC.

What is the ISO 8601 week number? ›

The ISO 8601 rule is: The first week of the year is the week containing the first Thursday. So if January 1 falls on a Friday, it belongs to the last week of the previous year. If December 31 falls on a Wednesday, it belongs to week 01 of the following year.

What is the T and Z in a timestamp? ›

The T doesn't really stand for anything. It is just the separator that the ISO 8601 combined date-time format requires. You can read it as an abbreviation for Time. The Z stands for the Zero timezone, as it is offset by 0 from the Coordinated Universal Time (UTC).

What does Z in timestamp mean? ›

The Z stands for the Zero timezone, as it is offset by 0 from the Coordinated Universal Time (UTC).

How to convert ISO 8601 to timestamp? ›

You can do your conversion in just three easy steps :
  1. Convert your ISO 8601 string to a Date object.
  2. Use getTime to convert your Date object to a universal time timestamp.
  3. Wrap "/Date(" and ")/" around your result.
May 8, 2018

What is the format for ISO 8601 date and time in Java? ›

The format used is yyyy-MM-dd'T'HH:mm:ss. ISO8601 formatter for date-time with time zone. The format used is yyyy-MM-dd'T'HH:mm:ssZZ.

How to convert string to date ISO format? ›

Convert isoformat string to date and time: fromisoformat()

To convert an ISO format (ISO 8601) string to date , time , and datetime objects, use the fromisoformat() class method of the date , time , and datetime classes.

How to convert string yyyy-mm-dd to date in java? ›

Let's see the simple code to convert String to Date in java.
  1. import java.text.SimpleDateFormat;
  2. import java.util.Date;
  3. public class StringToDateExample1 {
  4. public static void main(String[] args)throws Exception {
  5. String sDate1="31/12/1998";
  6. Date date1=new SimpleDateFormat("dd/MM/yyyy").parse(sDate1);

What is the date format globally? ›

The ISO standard takes a general-to-specific approach for its date formats: The year comes first, followed by the month and then by the day of the month, with most elements represented as numerical values. For example, the ISO representation for July 15, 2022 is either 20220715 or 2022-07-15.

Which country uses ISO 8601? ›

ISO 8601 is the only format that the Government of Canada and Standards Council of Canada officially recommend for all-numeric dates. However, usage differs with context. All three long forms are used in Canada.

How to format ISO day of week? ›

A precise date is specified by the ISO week-numbering year in the format YYYY , a week number in the format ww prefixed by the letter 'W', and the weekday number, a digit d from 1 through 7, beginning with Monday and ending with Sunday.

How do I remove Z from UTC timestamp? ›

If you don't have it already, you can convert it to ISO using the toISOString function on a Date object. This will get rid of both T and Z, resulting in "2022-06-22 07:54:52.657". Note that you want to replace T with empty whitespace, while you want to replace Z with no character.

How do I convert UTC time to my time? ›

Add the local time offset to the UTC time. For example, if your local time offset is -5:00, and if the UTC time is shown as 11:00, add -5 to 11. The time setting when adjusted for offset is 06:00 (6:00 A.M.). Note The date also follows UTC format.

How do you read a timestamp? ›

For example, if the Unix epoch time is 1639172876 seconds, then the human date would be Friday, Dec. 10, 2021, at 9:47:56 p.m. This timestamp written in a dd mm yyyy hh mm ss format would be 10-12-2021 9:47:56.

Where is Zulu time zone? ›

This line of longitude is based on the location of the Royal Observatory in Greenwich, England, near London. Zulu is the radio transmission articulation for the letter Z. Zulu time is measured in hours, minutes and seconds using the Gregorian calendar, military time divisions of hours and minutes, and a 24-hour format.

What do you mean by UTC? ›

Prior to 1972, this time was called Greenwich Mean Time (GMT) but is now referred to as Coordinated Universal Time or Universal Time Coordinated (UTC). It is a coordinated time scale, maintained by the Bureau International des Poids et Mesures (BIPM).

What is the difference between timestamp and timestamp TZ? ›

TIMESTAMPTZ is the same as TIMESTAMP WITH TIME ZONE : both data types store the UTC offset of the specified time. TIMESTAMP is an alias for DATETIME and SMALLDATETIME .

How to convert timestamp string to date format? ›

STRING to DATETIME
  1. If you use the CAST function, the date value of the STRING type must be specified in the yyyy-mm-dd hh:mi:ss format.
  2. If you use the TO_DATE function, you must set the value of the format parameter to yyyy-mm-dd hh:mi:ss .
May 19, 2022

How do I convert timestamp to time format? ›

Converting timestamp to datetime

We may use the datetime module's fromtimestamp() method to convert the timestamp back to a datetime object. It returns the POSIX timestamp corresponding to the local date and time, as returned by time. time().

How to convert timestamp value to date? ›

a) Convert Timestamp to Date in Java Using Date constructor
  1. import java. sql. Timestamp;
  2. import java. util. Date;
  3. public class TimestampToDateExample1 {
  4. public static void main(String args[]){
  5. Timestamp timestamp = new Timestamp(System. currentTimeMillis());
  6. Date date = new Date(timestamp. getTime());
  7. System. out. ...
  8. }

How date time must be formatted by ISO 8601 standards? ›

Therefore, the order of the elements used to express date and time in ISO 8601 is as follows: year, month, day, hour, minutes, seconds, and milliseconds. For example, September 27, 2022 at 6 p.m. is represented as 2022-09-27 18:00:00.000.

How to format date without time in ISO 8601? ›

ISO8601 formatter for date-time without time zone. The format used is yyyy-MM-dd'T'HH:mm:ss.

How to convert ISO 8601 to date? ›

Use the Date() constructor to convert an ISO string to a date object. The Date() constructor will easily parse the ISO 8601 string and will return a Date object.

How to convert string date format to date? ›

Converting String to java.util.Date

SimpleDateFormat formatter = new SimpleDateFormat("dd-MMM-yyyy", Locale.ENGLISH); String dateInString = "7-Jun-2013"; Date date = formatter.parse(dateInString);

How to compare two ISO date strings? ›

To compare two dates, you can use either toString() or valueOf() . The toString() method converts the date into an ISO date string, and the valueOf() method converts the date into milliseconds since the epoch.

How to convert string date format to date format in JavaScript? ›

You can Convert the date value from String to Date in JavaScript using the Date() class. You can also use parse, which is a static method of the Date class. You can also split the given string date into three parts representing the date, month, and year and then convert it to Date format.

How to convert any date format to yyyy-mm-dd in JavaScript? ›

For converting the date to ISO format YYYY-MM-DD, use the “getFullYear()”, “getMonth()” and “getDate()” methods of the Date object. These methods get the month, year, and date of the respective given date.

How do I create a date in yyyy-mm-dd format in Java? ›

Creating A Simple Date Format

String pattern = "yyyy-MM-dd" ; SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern); The specified parameter “pattern” is the pattern used for formatting and parsing dates.

How to convert date format from dd mm yyyy to mm dd yyyy in java? ›

How to parse Date from String in the format: dd/MM/yyyy to dd/MM/yyyy in java?
  1. Get the input date string.
  2. Convert it into java. util. ...
  3. Instantiate the SimpleDateFormat class by passing the desired (new) format as string to its constructor.
  4. Invoke the format() method by passing the above obtained Date object as parameter.
Oct 14, 2019

What is the date format in Europe vs USA? ›

In Europe, the standard date format is day/month/year, whereas in the US, it's month/day/year. For example, January 1st, 2022 would be written as 01/01/2022 in the US, but as 01/01/2022 in Europe.

What is the date format in the US and EU? ›

The format MM/DD/YY is unique to the United States (but sometimes used in Canada, too, which can obviously create some confusion there). Most of Europe uses DD/MM/YY. Japan uses YY/MM/DD.

What are all the date formats? ›

Date Format Types
FormatDate orderDescription
1MM/DD/YYMonth-Day-Year with leading zeros (02/17/2009)
2DD/MM/YYDay-Month-Year with leading zeros (17/02/2009)
3YY/MM/DDYear-Month-Day with leading zeros (2009/02/17)
4Month D, YrMonth name-Day-Year with no leading zeros (February 17, 2009)
24 more rows

How do I convert ISO 8601 to date in Excel? ›

=DATEVALUE(MID(C2,1,10))+TIMEVALUE(MID(C2,12,8))+(8/24)
  1. July 2022.
  2. April 2022.
  3. December 2021.
  4. October 2021.
  5. September 2021.
Mar 16, 2020

References

Top Articles
Latest Posts
Article information

Author: Rev. Porsche Oberbrunner

Last Updated: 16/05/2023

Views: 6411

Rating: 4.2 / 5 (73 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Rev. Porsche Oberbrunner

Birthday: 1994-06-25

Address: Suite 153 582 Lubowitz Walks, Port Alfredoborough, IN 72879-2838

Phone: +128413562823324

Job: IT Strategist

Hobby: Video gaming, Basketball, Web surfing, Book restoration, Jogging, Shooting, Fishing

Introduction: My name is Rev. Porsche Oberbrunner, I am a zany, graceful, talented, witty, determined, shiny, enchanting person who loves writing and wants to share my knowledge and understanding with you.