-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtrait.TimeZone.html
213 lines (208 loc) · 48.9 KB
/
trait.TimeZone.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The time zone."><title>TimeZone in chrono - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-46132b98.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="chrono" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0 (4d91de4e4 2025-02-17)" data-channel="1.85.0" data-search-js="search-75f5ac3e.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../chrono/index.html">chrono</a><span class="version">0.4.40</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Time<wbr>Zone</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Offset" title="Offset">Offset</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.from_offset" title="from_offset">from_offset</a></li><li><a href="#tymethod.offset_from_local_date" title="offset_from_local_date">offset_from_local_date</a></li><li><a href="#tymethod.offset_from_local_datetime" title="offset_from_local_datetime">offset_from_local_datetime</a></li><li><a href="#tymethod.offset_from_utc_date" title="offset_from_utc_date">offset_from_utc_date</a></li><li><a href="#tymethod.offset_from_utc_datetime" title="offset_from_utc_datetime">offset_from_utc_datetime</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.datetime_from_str" title="datetime_from_str">datetime_from_str</a></li><li><a href="#method.from_local_date" title="from_local_date">from_local_date</a></li><li><a href="#method.from_local_datetime" title="from_local_datetime">from_local_datetime</a></li><li><a href="#method.from_utc_date" title="from_utc_date">from_utc_date</a></li><li><a href="#method.from_utc_datetime" title="from_utc_datetime">from_utc_datetime</a></li><li><a href="#method.isoywd" title="isoywd">isoywd</a></li><li><a href="#method.isoywd_opt" title="isoywd_opt">isoywd_opt</a></li><li><a href="#method.timestamp" title="timestamp">timestamp</a></li><li><a href="#method.timestamp_micros" title="timestamp_micros">timestamp_micros</a></li><li><a href="#method.timestamp_millis" title="timestamp_millis">timestamp_millis</a></li><li><a href="#method.timestamp_millis_opt" title="timestamp_millis_opt">timestamp_millis_opt</a></li><li><a href="#method.timestamp_nanos" title="timestamp_nanos">timestamp_nanos</a></li><li><a href="#method.timestamp_opt" title="timestamp_opt">timestamp_opt</a></li><li><a href="#method.with_ymd_and_hms" title="with_ymd_and_hms">with_ymd_and_hms</a></li><li><a href="#method.ymd" title="ymd">ymd</a></li><li><a href="#method.ymd_opt" title="ymd_opt">ymd_opt</a></li><li><a href="#method.yo" title="yo">yo</a></li><li><a href="#method.yo_opt" title="yo_opt">yo_opt</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate chrono</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">chrono</a></span><h1>Trait <span class="trait">TimeZone</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/chrono/offset/mod.rs.html#279-596">Source</a> </span></div><pre class="rust item-decl"><code>pub trait TimeZone: <a class="trait" href="https://doc.rust-lang.org/1.85.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.85.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> {
type <a href="#associatedtype.Offset" class="associatedtype">Offset</a>: <a class="trait" href="trait.Offset.html" title="trait chrono::Offset">Offset</a>;
<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 23 methods</span></summary> // Required methods
fn <a href="#tymethod.from_offset" class="fn">from_offset</a>(offset: &Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::TimeZone::Offset">Offset</a>) -> Self;
<span class="item-spacer"></span> fn <a href="#tymethod.offset_from_local_date" class="fn">offset_from_local_date</a>(
&self,
local: &<a class="struct" href="struct.NaiveDate.html" title="struct chrono::NaiveDate">NaiveDate</a>,
) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::TimeZone::Offset">Offset</a>>;
<span class="item-spacer"></span> fn <a href="#tymethod.offset_from_local_datetime" class="fn">offset_from_local_datetime</a>(
&self,
local: &<a class="struct" href="struct.NaiveDateTime.html" title="struct chrono::NaiveDateTime">NaiveDateTime</a>,
) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::TimeZone::Offset">Offset</a>>;
<span class="item-spacer"></span> fn <a href="#tymethod.offset_from_utc_date" class="fn">offset_from_utc_date</a>(&self, utc: &<a class="struct" href="struct.NaiveDate.html" title="struct chrono::NaiveDate">NaiveDate</a>) -> Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::TimeZone::Offset">Offset</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.offset_from_utc_datetime" class="fn">offset_from_utc_datetime</a>(&self, utc: &<a class="struct" href="struct.NaiveDateTime.html" title="struct chrono::NaiveDateTime">NaiveDateTime</a>) -> Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::TimeZone::Offset">Offset</a>;
// Provided methods
fn <a href="#method.with_ymd_and_hms" class="fn">with_ymd_and_hms</a>(
&self,
year: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i32.html">i32</a>,
month: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
day: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
hour: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
min: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
sec: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self>> { ... }
<span class="item-spacer"></span> fn <a href="#method.ymd" class="fn">ymd</a>(&self, year: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i32.html">i32</a>, month: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>, day: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>) -> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Self> { ... }
<span class="item-spacer"></span> fn <a href="#method.ymd_opt" class="fn">ymd_opt</a>(
&self,
year: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i32.html">i32</a>,
month: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
day: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Self>> { ... }
<span class="item-spacer"></span> fn <a href="#method.yo" class="fn">yo</a>(&self, year: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i32.html">i32</a>, ordinal: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>) -> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Self> { ... }
<span class="item-spacer"></span> fn <a href="#method.yo_opt" class="fn">yo_opt</a>(&self, year: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i32.html">i32</a>, ordinal: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Self>> { ... }
<span class="item-spacer"></span> fn <a href="#method.isoywd" class="fn">isoywd</a>(&self, year: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i32.html">i32</a>, week: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>, weekday: <a class="enum" href="enum.Weekday.html" title="enum chrono::Weekday">Weekday</a>) -> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Self> { ... }
<span class="item-spacer"></span> fn <a href="#method.isoywd_opt" class="fn">isoywd_opt</a>(
&self,
year: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i32.html">i32</a>,
week: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
weekday: <a class="enum" href="enum.Weekday.html" title="enum chrono::Weekday">Weekday</a>,
) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Self>> { ... }
<span class="item-spacer"></span> fn <a href="#method.timestamp" class="fn">timestamp</a>(&self, secs: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i64.html">i64</a>, nsecs: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self> { ... }
<span class="item-spacer"></span> fn <a href="#method.timestamp_opt" class="fn">timestamp_opt</a>(
&self,
secs: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i64.html">i64</a>,
nsecs: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self>> { ... }
<span class="item-spacer"></span> fn <a href="#method.timestamp_millis" class="fn">timestamp_millis</a>(&self, millis: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i64.html">i64</a>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self> { ... }
<span class="item-spacer"></span> fn <a href="#method.timestamp_millis_opt" class="fn">timestamp_millis_opt</a>(
&self,
millis: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i64.html">i64</a>,
) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self>> { ... }
<span class="item-spacer"></span> fn <a href="#method.timestamp_nanos" class="fn">timestamp_nanos</a>(&self, nanos: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i64.html">i64</a>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self> { ... }
<span class="item-spacer"></span> fn <a href="#method.timestamp_micros" class="fn">timestamp_micros</a>(&self, micros: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i64.html">i64</a>) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self>> { ... }
<span class="item-spacer"></span> fn <a href="#method.datetime_from_str" class="fn">datetime_from_str</a>(
&self,
s: &<a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.str.html">str</a>,
fmt: &<a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.str.html">str</a>,
) -> <a class="type" href="format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self>> { ... }
<span class="item-spacer"></span> fn <a href="#method.from_local_date" class="fn">from_local_date</a>(&self, local: &<a class="struct" href="struct.NaiveDate.html" title="struct chrono::NaiveDate">NaiveDate</a>) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Self>> { ... }
<span class="item-spacer"></span> fn <a href="#method.from_local_datetime" class="fn">from_local_datetime</a>(
&self,
local: &<a class="struct" href="struct.NaiveDateTime.html" title="struct chrono::NaiveDateTime">NaiveDateTime</a>,
) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self>> { ... }
<span class="item-spacer"></span> fn <a href="#method.from_utc_date" class="fn">from_utc_date</a>(&self, utc: &<a class="struct" href="struct.NaiveDate.html" title="struct chrono::NaiveDate">NaiveDate</a>) -> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Self> { ... }
<span class="item-spacer"></span> fn <a href="#method.from_utc_datetime" class="fn">from_utc_datetime</a>(&self, utc: &<a class="struct" href="struct.NaiveDateTime.html" title="struct chrono::NaiveDateTime">NaiveDateTime</a>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self> { ... }
</details>}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The time zone.</p>
<p>The methods here are the primary constructors for the <a href="struct.DateTime.html" title="struct chrono::DateTime"><code>DateTime</code></a> type.</p>
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Offset" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#283">Source</a><h4 class="code-header">type <a href="#associatedtype.Offset" class="associatedtype">Offset</a>: <a class="trait" href="trait.Offset.html" title="trait chrono::Offset">Offset</a></h4></section></summary><div class="docblock"><p>An associated offset type.
This type is used to store the actual offset in date and time types.
The original <code>TimeZone</code> value can be recovered via <code>TimeZone::from_offset</code>.</p>
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.from_offset" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#546">Source</a><h4 class="code-header">fn <a href="#tymethod.from_offset" class="fn">from_offset</a>(offset: &Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::TimeZone::Offset">Offset</a>) -> Self</h4></section></summary><div class="docblock"><p>Reconstructs the time zone from the offset.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.offset_from_local_date" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#549">Source</a><h4 class="code-header">fn <a href="#tymethod.offset_from_local_date" class="fn">offset_from_local_date</a>(
&self,
local: &<a class="struct" href="struct.NaiveDate.html" title="struct chrono::NaiveDate">NaiveDate</a>,
) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::TimeZone::Offset">Offset</a>></h4></section></summary><div class="docblock"><p>Creates the offset(s) for given local <code>NaiveDate</code> if possible.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.offset_from_local_datetime" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#552">Source</a><h4 class="code-header">fn <a href="#tymethod.offset_from_local_datetime" class="fn">offset_from_local_datetime</a>(
&self,
local: &<a class="struct" href="struct.NaiveDateTime.html" title="struct chrono::NaiveDateTime">NaiveDateTime</a>,
) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::TimeZone::Offset">Offset</a>></h4></section></summary><div class="docblock"><p>Creates the offset(s) for given local <code>NaiveDateTime</code> if possible.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.offset_from_utc_date" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#576">Source</a><h4 class="code-header">fn <a href="#tymethod.offset_from_utc_date" class="fn">offset_from_utc_date</a>(&self, utc: &<a class="struct" href="struct.NaiveDate.html" title="struct chrono::NaiveDate">NaiveDate</a>) -> Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::TimeZone::Offset">Offset</a></h4></section></summary><div class="docblock"><p>Creates the offset for given UTC <code>NaiveDate</code>. This cannot fail.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.offset_from_utc_datetime" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#579">Source</a><h4 class="code-header">fn <a href="#tymethod.offset_from_utc_datetime" class="fn">offset_from_utc_datetime</a>(&self, utc: &<a class="struct" href="struct.NaiveDateTime.html" title="struct chrono::NaiveDateTime">NaiveDateTime</a>) -> Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::TimeZone::Offset">Offset</a></h4></section></summary><div class="docblock"><p>Creates the offset for given UTC <code>NaiveDateTime</code>. This cannot fail.</p>
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.with_ymd_and_hms" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#290-304">Source</a><h4 class="code-header">fn <a href="#method.with_ymd_and_hms" class="fn">with_ymd_and_hms</a>(
&self,
year: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i32.html">i32</a>,
month: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
day: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
hour: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
min: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
sec: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self>></h4></section></summary><div class="docblock"><p>Make a new <code>DateTime</code> from year, month, day, time components and current time zone.</p>
<p>This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.</p>
<p>Returns <code>MappedLocalTime::None</code> on invalid input data.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.ymd" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#315-317">Source</a><h4 class="code-header">fn <a href="#method.ymd" class="fn">ymd</a>(&self, year: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i32.html">i32</a>, month: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>, day: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>) -> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Self></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>with_ymd_and_hms()</code> instead</span></div></span></summary><div class="docblock"><p>Makes a new <code>Date</code> from year, month, day and the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Panics on the out-of-range date, invalid month and/or day.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.ymd_opt" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#328-333">Source</a><h4 class="code-header">fn <a href="#method.ymd_opt" class="fn">ymd_opt</a>(
&self,
year: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i32.html">i32</a>,
month: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
day: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Self>></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>with_ymd_and_hms()</code> instead</span></div></span></summary><div class="docblock"><p>Makes a new <code>Date</code> from year, month, day and the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Returns <code>None</code> on the out-of-range date, invalid month and/or day.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.yo" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#347-349">Source</a><h4 class="code-header">fn <a href="#method.yo" class="fn">yo</a>(&self, year: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i32.html">i32</a>, ordinal: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>) -> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Self></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>from_local_datetime()</code> with a <code>NaiveDateTime</code> instead</span></div></span></summary><div class="docblock"><p>Makes a new <code>Date</code> from year, day of year (DOY or “ordinal”) and the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Panics on the out-of-range date and/or invalid DOY.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.yo_opt" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#363-368">Source</a><h4 class="code-header">fn <a href="#method.yo_opt" class="fn">yo_opt</a>(&self, year: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i32.html">i32</a>, ordinal: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Self>></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>from_local_datetime()</code> with a <code>NaiveDateTime</code> instead</span></div></span></summary><div class="docblock"><p>Makes a new <code>Date</code> from year, day of year (DOY or “ordinal”) and the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Returns <code>None</code> on the out-of-range date and/or invalid DOY.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.isoywd" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#384-386">Source</a><h4 class="code-header">fn <a href="#method.isoywd" class="fn">isoywd</a>(&self, year: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i32.html">i32</a>, week: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>, weekday: <a class="enum" href="enum.Weekday.html" title="enum chrono::Weekday">Weekday</a>) -> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Self></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>from_local_datetime()</code> with a <code>NaiveDateTime</code> instead</span></div></span></summary><div class="docblock"><p>Makes a new <code>Date</code> from ISO week date (year and week number), day of the week (DOW) and
the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.
The resulting <code>Date</code> may have a different year from the input year.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Panics on the out-of-range date and/or invalid week number.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.isoywd_opt" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#402-407">Source</a><h4 class="code-header">fn <a href="#method.isoywd_opt" class="fn">isoywd_opt</a>(
&self,
year: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i32.html">i32</a>,
week: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
weekday: <a class="enum" href="enum.Weekday.html" title="enum chrono::Weekday">Weekday</a>,
) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Self>></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>from_local_datetime()</code> with a <code>NaiveDateTime</code> instead</span></div></span></summary><div class="docblock"><p>Makes a new <code>Date</code> from ISO week date (year and week number), day of the week (DOW) and
the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.
The resulting <code>Date</code> may have a different year from the input year.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Returns <code>None</code> on the out-of-range date and/or invalid week number.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.timestamp" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#422-424">Source</a><h4 class="code-header">fn <a href="#method.timestamp" class="fn">timestamp</a>(&self, secs: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i64.html">i64</a>, nsecs: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>timestamp_opt()</code> instead</span></div></span></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the number of non-leap seconds
since January 1, 1970 0:00:00 UTC (aka “UNIX timestamp”)
and the number of nanoseconds since the last whole non-leap second.</p>
<p>The nanosecond part can exceed 1,000,000,000 in order to represent a
<a href="struct.NaiveTime.html#leap-second-handling" title="struct chrono::NaiveTime">leap second</a>, but only when <code>secs % 60 == 59</code>.
(The true “UNIX timestamp” cannot represent a leap second unambiguously.)</p>
<h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5>
<p>Panics on the out-of-range number of seconds and/or invalid nanosecond,
for a non-panicking version see <a href="#method.timestamp_opt"><code>timestamp_opt</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.timestamp_opt" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#446-451">Source</a><h4 class="code-header">fn <a href="#method.timestamp_opt" class="fn">timestamp_opt</a>(
&self,
secs: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i64.html">i64</a>,
nsecs: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.u32.html">u32</a>,
) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self>></h4></section></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the number of non-leap seconds
since January 1, 1970 0:00:00 UTC (aka “UNIX timestamp”)
and the number of nanoseconds since the last whole non-leap second.</p>
<p>The nanosecond part can exceed 1,000,000,000 in order to represent a
<a href="struct.NaiveTime.html#leap-second-handling" title="struct chrono::NaiveTime">leap second</a>, but only when <code>secs % 60 == 59</code>.
(The true “UNIX timestamp” cannot represent a leap second unambiguously.)</p>
<h5 id="errors"><a class="doc-anchor" href="#errors">§</a>Errors</h5>
<p>Returns <code>MappedLocalTime::None</code> on out-of-range number of seconds and/or
invalid nanosecond, otherwise always returns <code>MappedLocalTime::Single</code>.</p>
<h5 id="example"><a class="doc-anchor" href="#example">§</a>Example</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>chrono::{TimeZone, Utc};
<span class="macro">assert_eq!</span>(Utc.timestamp_opt(<span class="number">1431648000</span>, <span class="number">0</span>).unwrap().to_string(), <span class="string">"2015-05-15 00:00:00 UTC"</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.timestamp_millis" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#459-461">Source</a><h4 class="code-header">fn <a href="#method.timestamp_millis" class="fn">timestamp_millis</a>(&self, millis: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i64.html">i64</a>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>timestamp_millis_opt()</code> instead</span></div></span></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the number of non-leap milliseconds
since January 1, 1970 0:00:00 UTC (aka “UNIX timestamp”).</p>
<p>Panics on out-of-range number of milliseconds for a non-panicking
version see <a href="#method.timestamp_millis_opt"><code>timestamp_millis_opt</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.timestamp_millis_opt" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#480-485">Source</a><h4 class="code-header">fn <a href="#method.timestamp_millis_opt" class="fn">timestamp_millis_opt</a>(&self, millis: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i64.html">i64</a>) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self>></h4></section></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the number of non-leap milliseconds
since January 1, 1970 0:00:00 UTC (aka “UNIX timestamp”).</p>
<p>Returns <code>MappedLocalTime::None</code> on out-of-range number of milliseconds
and/or invalid nanosecond, otherwise always returns
<code>MappedLocalTime::Single</code>.</p>
<h5 id="example-1"><a class="doc-anchor" href="#example-1">§</a>Example</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>chrono::{MappedLocalTime, TimeZone, Utc};
<span class="kw">match </span>Utc.timestamp_millis_opt(<span class="number">1431648000</span>) {
MappedLocalTime::Single(dt) => <span class="macro">assert_eq!</span>(dt.timestamp(), <span class="number">1431648</span>),
<span class="kw">_ </span>=> <span class="macro">panic!</span>(<span class="string">"Incorrect timestamp_millis"</span>),
};</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.timestamp_nanos" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#499-501">Source</a><h4 class="code-header">fn <a href="#method.timestamp_nanos" class="fn">timestamp_nanos</a>(&self, nanos: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i64.html">i64</a>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self></h4></section></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the number of non-leap nanoseconds
since January 1, 1970 0:00:00 UTC (aka “UNIX timestamp”).</p>
<p>Unlike <a href="#method.timestamp_millis_opt"><code>timestamp_millis_opt</code></a>, this never fails.</p>
<h5 id="example-2"><a class="doc-anchor" href="#example-2">§</a>Example</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>chrono::{TimeZone, Utc};
<span class="macro">assert_eq!</span>(Utc.timestamp_nanos(<span class="number">1431648000000000</span>).timestamp(), <span class="number">1431648</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.timestamp_micros" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#513-518">Source</a><h4 class="code-header">fn <a href="#method.timestamp_micros" class="fn">timestamp_micros</a>(&self, micros: <a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.i64.html">i64</a>) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self>></h4></section></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the number of non-leap microseconds
since January 1, 1970 0:00:00 UTC (aka “UNIX timestamp”).</p>
<h5 id="example-3"><a class="doc-anchor" href="#example-3">§</a>Example</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>chrono::{TimeZone, Utc};
<span class="macro">assert_eq!</span>(Utc.timestamp_micros(<span class="number">1431648000000</span>).unwrap().timestamp(), <span class="number">1431648</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.datetime_from_str" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#539-543">Source</a><h4 class="code-header">fn <a href="#method.datetime_from_str" class="fn">datetime_from_str</a>(&self, s: &<a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.str.html">str</a>, fmt: &<a class="primitive" href="https://doc.rust-lang.org/1.85.0/std/primitive.str.html">str</a>) -> <a class="type" href="format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self>></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.29: use <code>DateTime::parse_from_str</code> or <code>NaiveDateTime::parse_from_str</code> with <code>and_utc()</code> or <code>and_local_timezone()</code> instead</span></div></span></summary><div class="docblock"><p>Parses a string with the specified format string and returns a
<code>DateTime</code> with the current offset.</p>
<p>See the <a href="format/strftime/index.html" title="mod chrono::format::strftime"><code>crate::format::strftime</code></a> module on the
supported escape sequences.</p>
<p>If the to-be-parsed string includes an offset, it <em>must</em> match the
offset of the TimeZone, otherwise an error will be returned.</p>
<p>See also <a href="struct.DateTime.html#method.parse_from_str" title="associated function chrono::DateTime::parse_from_str"><code>DateTime::parse_from_str</code></a> which gives a <a href="struct.DateTime.html" title="struct chrono::DateTime"><code>DateTime</code></a> with
parsed <a href="struct.FixedOffset.html" title="struct chrono::FixedOffset"><code>FixedOffset</code></a>.</p>
<p>See also <a href="struct.NaiveDateTime.html#method.parse_from_str" title="associated function chrono::NaiveDateTime::parse_from_str"><code>NaiveDateTime::parse_from_str</code></a> which gives a <a href="struct.NaiveDateTime.html" title="struct chrono::NaiveDateTime"><code>NaiveDateTime</code></a> without
an offset, but can be converted to a <a href="struct.DateTime.html" title="struct chrono::DateTime"><code>DateTime</code></a> with <a href="struct.NaiveDateTime.html#method.and_utc" title="method chrono::NaiveDateTime::and_utc"><code>NaiveDateTime::and_utc</code></a> or
<a href="struct.NaiveDateTime.html#method.and_local_timezone" title="method chrono::NaiveDateTime::and_local_timezone"><code>NaiveDateTime::and_local_timezone</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_local_date" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#558-563">Source</a><h4 class="code-header">fn <a href="#method.from_local_date" class="fn">from_local_date</a>(&self, local: &<a class="struct" href="struct.NaiveDate.html" title="struct chrono::NaiveDate">NaiveDate</a>) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Self>></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>from_local_datetime()</code> instead</span></div></span></summary><div class="docblock"><p>Converts the local <code>NaiveDate</code> to the timezone-aware <code>Date</code> if possible.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_local_datetime" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#567-573">Source</a><h4 class="code-header">fn <a href="#method.from_local_datetime" class="fn">from_local_datetime</a>(
&self,
local: &<a class="struct" href="struct.NaiveDateTime.html" title="struct chrono::NaiveDateTime">NaiveDateTime</a>,
) -> <a class="type" href="offset/type.MappedLocalTime.html" title="type chrono::offset::MappedLocalTime">MappedLocalTime</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self>></h4></section></summary><div class="docblock"><p>Converts the local <code>NaiveDateTime</code> to the timezone-aware <code>DateTime</code> if possible.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_utc_date" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#586-588">Source</a><h4 class="code-header">fn <a href="#method.from_utc_date" class="fn">from_utc_date</a>(&self, utc: &<a class="struct" href="struct.NaiveDate.html" title="struct chrono::NaiveDate">NaiveDate</a>) -> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Self></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>from_utc_datetime()</code> instead</span></div></span></summary><div class="docblock"><p>Converts the UTC <code>NaiveDate</code> to the local time.
The UTC is continuous and thus this cannot fail (but can give the duplicate local time).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_utc_datetime" class="method"><a class="src rightside" href="../src/chrono/offset/mod.rs.html#593-595">Source</a><h4 class="code-header">fn <a href="#method.from_utc_datetime" class="fn">from_utc_datetime</a>(&self, utc: &<a class="struct" href="struct.NaiveDateTime.html" title="struct chrono::NaiveDateTime">NaiveDateTime</a>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Self></h4></section></summary><div class="docblock"><p>Converts the UTC <code>NaiveDateTime</code> to the local time.
The UTC is continuous and thus this cannot fail (but can give the duplicate local time).</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.85.0/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-TimeZone-for-FixedOffset" class="impl"><a class="src rightside" href="../src/chrono/offset/fixed.rs.html#127-147">Source</a><a href="#impl-TimeZone-for-FixedOffset" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TimeZone.html" title="trait chrono::TimeZone">TimeZone</a> for <a class="struct" href="struct.FixedOffset.html" title="struct chrono::FixedOffset">FixedOffset</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Offset-1" class="associatedtype trait-impl"><a class="src rightside" href="../src/chrono/offset/fixed.rs.html#128">Source</a><a href="#associatedtype.Offset-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Offset" class="associatedtype">Offset</a> = <a class="struct" href="struct.FixedOffset.html" title="struct chrono::FixedOffset">FixedOffset</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TimeZone-for-Local" class="impl"><a class="src rightside" href="../src/chrono/offset/local/mod.rs.html#165-191">Source</a><a href="#impl-TimeZone-for-Local" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TimeZone.html" title="trait chrono::TimeZone">TimeZone</a> for <a class="struct" href="struct.Local.html" title="struct chrono::Local">Local</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Offset-2" class="associatedtype trait-impl"><a class="src rightside" href="../src/chrono/offset/local/mod.rs.html#166">Source</a><a href="#associatedtype.Offset-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Offset" class="associatedtype">Offset</a> = <a class="struct" href="struct.FixedOffset.html" title="struct chrono::FixedOffset">FixedOffset</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TimeZone-for-Utc" class="impl"><a class="src rightside" href="../src/chrono/offset/utc.rs.html#114-134">Source</a><a href="#impl-TimeZone-for-Utc" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TimeZone.html" title="trait chrono::TimeZone">TimeZone</a> for <a class="struct" href="struct.Utc.html" title="struct chrono::Utc">Utc</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Offset-3" class="associatedtype trait-impl"><a class="src rightside" href="../src/chrono/offset/utc.rs.html#115">Source</a><a href="#associatedtype.Offset-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Offset" class="associatedtype">Offset</a> = <a class="struct" href="struct.Utc.html" title="struct chrono::Utc">Utc</a></h4></section></div></details></div><script src="../trait.impl/chrono/offset/trait.TimeZone.js" async></script></section></div></main></body></html>