Main Content

timezones

List all time zones

Description

timezones returns a list of all Internet Assigned Numbers Authority (IANA) time zones accepted by the datetime function. By default, timezones displays the list in a separate window. For each time zone, the list includes the offset from UTC (in hours, where east is positive) and the daylight saving time shift (in hours).

timezones(area) returns a list containing all IANA time zones in the specified geographic area.

T = timezones(___) returns the list in a table instead of a separate window.

example

[T,vers] = timezones(___) also returns the IANA Time Zone Database version currently used by the datetime data type. This version includes recent updates from the IANA. For more information, see IANA Time Zone Database.

Examples

collapse all

Store all Australian time zones accepted by the datetime function in a table.

T = timezones('Australia')
T=11×4 table
              Name                 Area       UTCOffset    DSTOffset
    _________________________    _________    _________    _________

    {'Australia/Adelaide'   }    Australia       9.5            1   
    {'Australia/Brisbane'   }    Australia        10            0   
    {'Australia/Broken_Hill'}    Australia       9.5            1   
    {'Australia/Darwin'     }    Australia       9.5            0   
    {'Australia/Eucla'      }    Australia      8.75            0   
    {'Australia/Hobart'     }    Australia        10            1   
    {'Australia/Lindeman'   }    Australia        10            0   
    {'Australia/Lord_Howe'  }    Australia      10.5          0.5   
    {'Australia/Melbourne'  }    Australia        10            1   
    {'Australia/Perth'      }    Australia         8            0   
    {'Australia/Sydney'     }    Australia        10            1   

Sort the table by UTC offset.

sortrows(T,'UTCOffset')
ans=11×4 table
              Name                 Area       UTCOffset    DSTOffset
    _________________________    _________    _________    _________

    {'Australia/Perth'      }    Australia         8            0   
    {'Australia/Eucla'      }    Australia      8.75            0   
    {'Australia/Adelaide'   }    Australia       9.5            1   
    {'Australia/Broken_Hill'}    Australia       9.5            1   
    {'Australia/Darwin'     }    Australia       9.5            0   
    {'Australia/Brisbane'   }    Australia        10            0   
    {'Australia/Hobart'     }    Australia        10            1   
    {'Australia/Lindeman'   }    Australia        10            0   
    {'Australia/Melbourne'  }    Australia        10            1   
    {'Australia/Sydney'     }    Australia        10            1   
    {'Australia/Lord_Howe'  }    Australia      10.5          0.5   

Input Arguments

collapse all

Geographic area, specified as one of the areas in the table.

'Africa''Asia''Europe'
'America''Atlantic''Indian'
'Antarctica''Australia''Pacific'
'Arctic''Etc''All'

Output Arguments

collapse all

List of time zones, returned as a table.

IANA Time Zone Database version, returned as a character vector.

For more information, see IANA Time Zone Database.

Version History

Introduced in R2015b