Wolfram Language

Unidades e datas

Compare fusos horários

Obtenha a diferença numérica atual do GMT para o horário Central .

In[1]:=
Click for copyable input
TimeZoneOffset[Entity["TimeZone", "America/Chicago"]]
Out[1]=

Obtenha a diferença relativa para um fuso horário diferente em uma data específica.

In[2]:=
Click for copyable input
TimeZoneOffset[Entity["TimeZone", "America/Chicago"], Entity["TimeZone", "Europe/London"], DateObject[{2015, 3, 7}]]
Out[2]=

Obtenha uma representação geográfica da região do fuso horário.

In[3]:=
Click for copyable input
GeoGraphics[{Orange, Polygon[Entity["TimeZone", "Europe/London"]]}]
Out[3]=

Compare a diferença no deslocamento para várias partes de Indiana entre duas datas.

mostre o input completo da Wolfram Language
In[4]:=
Click for copyable input
zones = {Entity["TimeZone", "America/Chicago"], Entity["TimeZone", "America/New_York"], Entity["TimeZone", "America/Indiana/Indianapolis"], Entity["TimeZone", "America/Indiana/Knox"], Entity["TimeZone", "America/Indiana/Marengo"], Entity["TimeZone", "America/Indiana/Petersburg"], Entity["TimeZone", "America/Indiana/Tell_City"], Entity["TimeZone", "America/Indiana/Vevay"], Entity["TimeZone", "America/Indiana/Vincennes"], Entity["TimeZone", "America/Indiana/Winamac"]}; colorFunction[-6.] = Yellow; colorFunction[-5.] = Orange; colorFunction[-4.] = Red; Legended[Grid[ Partition[ Map[With[{date = #}, Framed@GeoRegionValuePlot[ Rule[#, colorFunction[ TimeZoneOffset[#, "GMT", date]]] & /@ zones, PlotLabel -> DateString[#, {"MonthName", " ", "Day", " ", "Year"}], GeoRange -> Entity["AdministrativeDivision", {"Indiana", "UnitedStates"}], PlotStyle -> Opacity[.5]]] &, {DateObject[{2005, 2, 1}], DateObject[{2005, 5, 1}], DateObject[{2007, 2, 1}], DateObject[{2007, 5, 1}]} ], 2]], SwatchLegend[colorFunction /@ {-6., -5., -4.}, {-6., -5., -4.}, LegendLabel -> "GMT Offset"]]
Out[4]=

Exemplos Relacionados

de en es fr ja ko ru zh