Officially out now: The TypeDB 3.0 Roadmap >>

DatetimeTZ

An ISO 8601 compliant date and time type with time zone information.

Syntax

A datetime-tz literal consists of a datetime followed by a time zone specification.

A time zone may be specified in two formats:

  • the ISO 8601 time offset from UTC: ±HH, ±HH:MM, ±HHMM, or Z;

  • the IANA time zone database TZ identifier (usually <Area>/<Location>, e.g. Europe/London).

The IANA TZ identifier is separated from the datetime by a space character.

Example datetime-tz literals
2024-03-30T12:00:00Z
+802701-09-21T12:34:56.789+01
1887-12-22T17:29 Asia/Kolkata
1920-04-26T16:30+01

Defining a datetime-tz valued attribute

define
  attribute scheduled-meeting-time value datetime-tz;

Inserting a datetime-tz valued attribute

insert
  $_ isa scheduled-meeting-time 2025-01-10T12:34:56 Europe/London;