getTimeZone
Returns the timezone ID or offset for a datetime object.
The function returns a string showing the timezone ID (e.g 'Australia/Sydney') or offset (e.g. '+02:00').
If the input object has no timezone ID or offset, the function returns a warning.
Parameters
DATETIME (datetime or string)
A datetime object, or a string in an automatically recognized datetime pattern.
Examples
For simplicity, these examples use strings in an automatically recognized patterns.
ATL in Script | Result |
---|---|
| +01:00 |
| -05:00 |
| America/Vancouver |
| Australia/Sydney |
| Europe/London |
| Asia/Hong_Kong |
| Europe/Zurich |
| Australia/Perth |
| Asia/Tokyo |