Template:DTZ

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

invalid date/time format

Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:DTZ/doc.

Format a date/time with time zone, using the user's language from their preferences.

Usage

{{DTZ |1= }}

Input can be specified using a subset of ISO 8601.

Examples:

  • {{DTZ|1968-12-21T07:51Z}} → 21 December 1968, 07:51 +00:00
  • {{DTZ|1968-12-21T07:51+05}} → 21 December 1968, 07:51 +05:00
  • {{DTZ|1968-12-21T07:51+05:30}} → 21 December 1968, 07:51 +05:30
  • {{DTZ|1968-12-21T07:51-05}} → 21 December 1968, 07:51 −05:00
  • {{DTZ|1968-12-21T07:51-05:30}} → 21 December 1968, 07:51 −05:30

with seconds in the time:

  • {{DTZ|1968-12-21T07:51:12Z}} → 21 December 1968, 07:51:12 +00:00
  • {{DTZ|1968-12-21T07:51:12+05}} → 21 December 1968, 07:51:12 +05:00
  • {{DTZ|1968-12-21T07:51:12+05:30}} → 21 December 1968, 07:51:12 +05:30
  • {{DTZ|1968-12-21T07:51:12-05}} → 21 December 1968, 07:51:12 −05:00
  • {{DTZ|1968-12-21T07:51:12-05:30}} → 21 December 1968, 07:51:12 −05:30

If the format isn't recognized, the page will be added to Category:Incorrect use of DTZ.

A tool is available at https://dtz.toolforge.org/ for automatically adding the DTZ template to file descriptions based on the date in Exif, with the possibility of adjusting for differences in time zone between the camera and photo location.

Template parameters

ParameterDescriptionDefaultStatus
1date/timeISO 8601 valueemptyrequired

Additional information

The template is intended to be used in the following namespaces: the File namespace

The template is intended to be used by the following user groups: all users