This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


Time zone based on longitude


[zd,zltr,zone] = timezone(long)
[zd,zltr,zone] = timezone(long,units)


[zd,zltr,zone] = timezone(long) returns an integer zone description, zd, an alphabetical zone indicator, zltr, and a character vector, zone, with the complete zone description and alphabetical zone indicator corresponding to the input longitude long.

[zd,zltr,zone] = timezone(long,units) specifies the angular units with a standard angle units. The default value is 'degrees'. Valid units are:

  • 'degrees' — decimal degrees

  • 'radians'


Given that it is locally 1330 (1:30 p.m.) at a longitude of 75ºW, determine GMT:

[zd,zltr,zone] = timezone(-75,'degrees')

zd =
zltr =
zone =
+5 R

Greenwich Mean Time (GMT) is 1330 plus five hours, or 1830 (6:30 p.m.).


Time is determined by the position of the Sun relative to the prime meridian, the zero longitude line running through Greenwich, England. When this meridian lies directly below the Sun, it is noon GMT. For local times elsewhere, the Earth is divided into 15º longitude bands, each centered on a central meridian. When a central meridian lies directly below the Sun, Local Mean Time (LMT) in that zone is noon. The zone description is an integer that when added to LMT gives GMT. For notational convenience, each zone is also given an alphabetical indicator. The indicator at Greenwich is Z, so GMT is often called ZULU time.

Note that there are actually 25 time zones, because the zone centered on the International Date Line (180º E/W) is split into two: "+12 Y" and "-12 M."


National and local governments set their own time zone boundaries for political or geographic convenience. The timezone function does not account for statutory deviations from the meridian-based system.

Introduced before R2006a

Was this topic helpful?