$TimeZone

$TimeZone

gives the current time zone to assume for dates and times.

Details

  • $TimeZone gives the default time zone used by date functions.
  • Possible timezone specifications include:
  • nnumber of hours added to GMT
    "zone"named time zone
    Entity["TimeZone", "zone"]time zone specified by the "TimeZone" entity
    loctime zone associated with the given location
    Automaticautomatically determine the time zone
    Nonespecify 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.
  • $TimeZone defaults to $SystemTimeZone.
  • $TimeZone=z resets the current time zone for purposes of functions like DateString, DateList, and AbsoluteTime.

Examples

open allclose all

Basic Examples  (1)

Show the number of hours that must be added to GMT to obtain local time:

Possible Issues  (1)

$TimeZone is set to the current GMT offset when the Wolfram System is initialized:

If the session persists across a daylight time transition, the offset will not change automatically:

In such cases, $TimeZone may be reset manually, or a named time zone may be used to account for the change:

Wolfram Research (2007), $TimeZone, Wolfram Language function, https://reference.wolfram.com/language/ref/$TimeZone.html (updated 2022).

Text

Wolfram Research (2007), $TimeZone, Wolfram Language function, https://reference.wolfram.com/language/ref/$TimeZone.html (updated 2022).

CMS

Wolfram Language. 2007. "$TimeZone." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/$TimeZone.html.

APA

Wolfram Language. (2007). $TimeZone. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$TimeZone.html

BibTeX

@misc{reference.wolfram_2023_$timezone, author="Wolfram Research", title="{$TimeZone}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/$TimeZone.html}", note=[Accessed: 18-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_$timezone, organization={Wolfram Research}, title={$TimeZone}, year={2022}, url={https://reference.wolfram.com/language/ref/$TimeZone.html}, note=[Accessed: 18-March-2024 ]}