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 = t.zone(place) 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
Can check whether it's daylight savings time, to pick which conversion to UTC, using http://www.mathworks.com/matlabcentral/fileexchange/32263-daylight-savings-time . Matlab should build in some of these time conversion utilities.
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.
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