I have a value stored as a duration object, and I would like to use this to specify the time zone of some datetime data, in terms of offset from UTC. However, it does not allow me to specify the 'TimeZone' property of the datetime series with a numeric or duration value, and I am not able to change the 'Format' property of the duration to a valid time zone format. I would prefer to be able to do this any of the following ways:
% Set the time zone with the duration object directly
t.TimeZone = durationVal;% Specify the duration object display format (automatically)
durationVal.Format = 'XXX';t.TimeZone = char(durationVal);% Specify duration object display format (manually)
durationVal.Format = '+HH:mm';t.TimeZone = char(durationVal);% Use a numeric value to specify the time zone
t.TimeZone = hours(durationVal);
Best Answer