DateTime.TimeZone
The DateTime.TimeZone value type represents a time zone.
Time zones are identified using regional names from the IANA Time Zone Database, such as "America/Los_Angeles" or "Australia/Sydney". Abbreviated names like "PST" and "EDT" are not valid names.
The complete list of available time zone names is shown below.
function DateTime.TimeZone(String name) → DateTime.TimeZone
Creates a TimeZone for the time zone name.
var timezone = DateTime.TimeZone("Australia/Melbourne") System.log("Time in Melbourne is:", DateTime.now(timezone))
If the name does not refer to a valid time zone, the UTC time zone will be used instead. You can check if the name was valid by testing the isValid property after creating it.
property Bool isValidread only
True if a valid time zone name was used to create the TimeZone, and false if not.