TimeZoneConvert
TimeZoneConvert[time,timezone]
converts the date or time object time to the specified time zone timezone.
TimeZoneConvert[time]
converts to the current $TimeZone value.
TimeZoneConvert[{time1,…,timen},timezone]
converts time1 through timen to the specified timezone.
Details
- time specifications should be a DateObject or TimeObject expression.
- Possible timezone specifications include:
-
n number of hours added to GMT "zone" named time zone Entity["TimeZone", "zone"] time zone specified by the "TimeZone" entity loc time zone associated with the given location Automatic automatically determine the time zone None specify no time zone information - For numeric values n, the value represents the number of hours that must be added to Greenwich Mean Time (GMT) to obtain local time.
- For string specifications "zone", the result will be returned in the associated named time zone.
- Example time zone strings include "America/Chicago", "Europe/London", "Asia/Tokyo" and "Zulu".
- A list of available time zone entities can be found using EntityList["TimeZone"].
- For location specifications loc, the time zone associated with the specified location Entity or GeoPosition will be used.
- TimeZoneConvert[time,Automatic] indicates that the time zone value should be determined automatically, defaulting to $TimeZone if no time zone information is otherwise available.
- TimeZoneConvert[time,None] will return an object with TimeZoneNone.
- TimeZoneConvert[Missing[…],timezone] will return Missing[…].
Examples
open allclose allBasic Examples (2)
Convert a DateObject from one time zone to another:
Convert a TimeObject from GMT to Eastern Time (North America):
Scope (4)
Numeric target specifications may be an Integer, Real or Rational value:
Time zone ID strings are typically of the form "Country/City", where the offset rules are determined by local regulations and subject to change over time:
Target time zone specifications can be a "TimeZone" Entity, in addition to numeric offsets:
When a GeoPosition or location Entity is used as the target, the time zone associated with that location will be used:
Properties & Relations (1)
For dates with a time zone value of None, the original date will remain unchanged when converted:
Possible Issues (1)
Some Entity expressions do not have time zone information available:
Text
Wolfram Research (2014), TimeZoneConvert, Wolfram Language function, https://reference.wolfram.com/language/ref/TimeZoneConvert.html (updated 2022).
CMS
Wolfram Language. 2014. "TimeZoneConvert." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/TimeZoneConvert.html.
APA
Wolfram Language. (2014). TimeZoneConvert. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TimeZoneConvert.html