View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
World Time Zones

4.8 | 5 ratings Rate this file 11 Downloads (last 30 days) File Size: 6.98 KB File ID: #22223 Version:
image thumbnail

World Time Zones



24 Nov 2008 (Updated )

Convert between local time and UTC. Get local time in various places in the world.

| Watch this File

File Information

This application is based on a large table of places (cities, states, provinces,states) and their time zones. The methods are:
  t = timeZones() construct time converter object
  tz = find a time zone (-11 to +12)
  tm = t.st2utc(time, place) convert local standard time to UTC
  tm = t.dst2utc(time, place) convert local daylight time to UTC
  tm = t.utc2st(time, place) convert utc to local standard time
  tm = t.utc2dst(time, place) convert utc to local daylight time
  t.places() all places for which time is tabulated

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (11)
12 Aug 2016 Gillis Danielsen

This only knows the current timeszone offset to utc, historical times may differ as timezones have changed as have date for DST etc.

04 Aug 2015 K E

K E (view profile)

Can check whether it's daylight savings time, to pick which conversion to UTC, using . Matlab should build in some of these time conversion utilities.

01 Dec 2014 Martin Foltin

It doesn't work with summer and winter time :(

Comment only
25 Oct 2012 VT

VT (view profile)

thank you, works perfectly

14 Feb 2011 David Goldsmith

Re: Erwin Mayer's contribution

But requires the Financial Toolbox

Comment only
24 Aug 2010 Tanyer Alan

Tanyer Alan (view profile)

21 Jun 2010 Erwin Mayer

Erwin Mayer (view profile)


I have written a timezone converter that takes into account DST.
Check it out here:

It makes use of the Calendar Class in Java.

Comment only
29 Nov 2009 Bill McKeeman

Patrick, I considered DST, and implemented entries in case the use knew DST was in effect. Tabulating DST, even for the U.S., required knowing geographical boundaries for the surprisingly varied laws regulating time. Such an effort was well beyond my own needs, and probably more work than payoff except for customers like AMTRAK. I would be interested in someone else trying it, but not me.

Comment only
27 Nov 2009 Patrick Leung

This is very useful. However, how would one incorporate daylight saving? Is there a daylight saving library somewhere?

Comment only
07 Nov 2009 Arvind Ananthan

The constructor errors out in R2009b release!
??? Undefined function or method 'ctranspose' for input arguments of type 'function_handle'.
Error in ==> timeZones>public at 601
o = struct(...
Error in ==> timeZones at 490
tobj = public(); % prepare public interface

Comment only
07 Nov 2009 Arvind Ananthan

This is a pretty useful class for doing all sorts of UTC time computations.

11 Apr 2009 1.1

Implemented workaround for problem found in 2009a.

24 Jun 2009 1.2

removed screen shot

09 Nov 2009 1.3

Somehow a floating ' got into the source file. Sorry

01 Sep 2016

Updated license

Contact us