Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

timezones

List time zones

Syntax

timezones
timezones(area)
T = (___)

Description

timezones displays a list of all IANA time zones accepted by the datetime function. 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) displays a list containing all IANA time zones in the specified geographic area.

example

T = (___) returns the list in a table.

Examples

collapse all

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

T = timezones('Australia')
T=12x4 table
             Name                Area       UTCOffset    DSTOffset
    _______________________    _________    _________    _________

    'Australia/Adelaide'       Australia     9.5           1      
    'Australia/Brisbane'       Australia      10           0      
    'Australia/Broken_Hill'    Australia     9.5           1      
    'Australia/Currie'         Australia      10           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=12x4 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/Currie'         Australia      10           1      
    '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'

Introduced in R2015b

Was this topic helpful?