d = tzoffset(t)
| Parameter | Description |
|---|---|
| inputs | A datetime array whose TimeZone property is empty, a fixed offset, local, or a supported timezone name. |
| Parameter | Description |
|---|---|
| output | A duration array containing offsets from UTC. |
Return UTC offsets for timezone-aware datetime values.
Named timezone offsets are read from the embedded timezone data. Fixed offsets such as +02:30 are parsed directly.
Array-valued inputs keep their data shape when the operation supports arrays. Scalar operands are expanded where the implementation defines scalar expansion.
tzoffset(datetime(2024, 7, 1, 'TimeZone', 'Europe/Paris'))
tzoffset(datetime(2024, 1, 1, 'TimeZone', '+02:30'))
| Version | Description |
|---|---|
| 2.0.0 | initial version |