forked from diesel-rs/diesel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstruct.DateTime.html
More file actions
248 lines (237 loc) · 150 KB
/
Copy pathstruct.DateTime.html
File metadata and controls
248 lines (237 loc) · 150 KB
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<!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="ISO 8601 combined date and time with time zone."><meta name="keywords" content="rust, rustlang, rust-lang, DateTime"><title>DateTime in chrono - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc struct"><!--[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">☰</button><a class="sidebar-logo" href="../chrono/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div>
</a><h2 class="location"></h2>
</nav>
<nav class="sidebar"><a class="sidebar-logo" href="../chrono/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div>
</a><h2 class="location"><a href="#">DateTime</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><ul><li><a href="#method.checked_add_signed">checked_add_signed</a></li><li><a href="#method.checked_sub_signed">checked_sub_signed</a></li><li><a href="#method.date">date</a></li><li><a href="#method.format">format</a></li><li><a href="#method.format_with_items">format_with_items</a></li><li><a href="#method.from_utc">from_utc</a></li><li><a href="#method.naive_local">naive_local</a></li><li><a href="#method.naive_utc">naive_utc</a></li><li><a href="#method.offset">offset</a></li><li><a href="#method.parse_from_rfc2822">parse_from_rfc2822</a></li><li><a href="#method.parse_from_rfc3339">parse_from_rfc3339</a></li><li><a href="#method.parse_from_str">parse_from_str</a></li><li><a href="#method.signed_duration_since">signed_duration_since</a></li><li><a href="#method.time">time</a></li><li><a href="#method.timestamp">timestamp</a></li><li><a href="#method.timestamp_millis">timestamp_millis</a></li><li><a href="#method.timestamp_nanos">timestamp_nanos</a></li><li><a href="#method.timestamp_subsec_micros">timestamp_subsec_micros</a></li><li><a href="#method.timestamp_subsec_millis">timestamp_subsec_millis</a></li><li><a href="#method.timestamp_subsec_nanos">timestamp_subsec_nanos</a></li><li><a href="#method.timezone">timezone</a></li><li><a href="#method.to_rfc2822">to_rfc2822</a></li><li><a href="#method.to_rfc3339">to_rfc3339</a></li><li><a href="#method.to_rfc3339_opts">to_rfc3339_opts</a></li><li><a href="#method.with_timezone">with_timezone</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><ul><li><a href="#impl-Add%3CDuration%3E">Add<Duration></a></li><li><a href="#impl-Add%3CFixedOffset%3E">Add<FixedOffset></a></li><li><a href="#impl-Clone">Clone</a></li><li><a href="#impl-Copy">Copy</a></li><li><a href="#impl-Datelike">Datelike</a></li><li><a href="#impl-Debug">Debug</a></li><li><a href="#impl-Display">Display</a></li><li><a href="#impl-DurationRound">DurationRound</a></li><li><a href="#impl-Eq">Eq</a></li><li><a href="#impl-From%3CDateTime%3CFixedOffset%3E%3E">From<DateTime<FixedOffset>></a></li><li><a href="#impl-From%3CDateTime%3CFixedOffset%3E%3E-1">From<DateTime<FixedOffset>></a></li><li><a href="#impl-From%3CDateTime%3CLocal%3E%3E">From<DateTime<Local>></a></li><li><a href="#impl-From%3CDateTime%3CLocal%3E%3E-1">From<DateTime<Local>></a></li><li><a href="#impl-From%3CDateTime%3CTz%3E%3E">From<DateTime<Tz>></a></li><li><a href="#impl-From%3CDateTime%3CUtc%3E%3E">From<DateTime<Utc>></a></li><li><a href="#impl-From%3CDateTime%3CUtc%3E%3E-1">From<DateTime<Utc>></a></li><li><a href="#impl-From%3CSystemTime%3E">From<SystemTime></a></li><li><a href="#impl-From%3CSystemTime%3E-1">From<SystemTime></a></li><li><a href="#impl-FromStr">FromStr</a></li><li><a href="#impl-FromStr-1">FromStr</a></li><li><a href="#impl-FromStr-2">FromStr</a></li><li><a href="#impl-Hash">Hash</a></li><li><a href="#impl-Ord">Ord</a></li><li><a href="#impl-PartialEq%3CDateTime%3CTz2%3E%3E">PartialEq<DateTime<Tz2>></a></li><li><a href="#impl-PartialOrd%3CDateTime%3CTz2%3E%3E">PartialOrd<DateTime<Tz2>></a></li><li><a href="#impl-Send">Send</a></li><li><a href="#impl-Sub%3CDateTime%3CTz%3E%3E">Sub<DateTime<Tz>></a></li><li><a href="#impl-Sub%3CDuration%3E">Sub<Duration></a></li><li><a href="#impl-Sub%3CFixedOffset%3E">Sub<FixedOffset></a></li><li><a href="#impl-Timelike">Timelike</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul><li><a href="#impl-RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Sync">Sync</a></li><li><a href="#impl-Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe">UnwindSafe</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><ul><li><a href="#impl-Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E">From<T></a></li><li><a href="#impl-Into%3CU%3E">Into<U></a></li><li><a href="#impl-ToOwned">ToOwned</a></li><li><a href="#impl-ToString">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E">TryInto<U></a></li></ul></div></section><h2 class="location"><a href="index.html">In chrono</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../chrono/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1">
<a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div>
</div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
<h1 class="fqn"><span class="in-band">Struct <a href="index.html">chrono</a>::<wbr><a class="struct" href="#">DateTime</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/chrono/datetime.rs.html#70-73">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust struct"><code>pub struct DateTime<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>ISO 8601 combined date and time with time zone.</p>
<p>There are some constructors implemented here (the <code>from_*</code> methods), but
the general-purpose constructors are all via the methods on the
<a href="./offset/trait.TimeZone.html"><code>TimeZone</code></a> implementations.</p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#80-254">source</a></span><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_utc" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#95-97">source</a></span><a href="#method.from_utc" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.from_utc" class="fnname">from_utc</a>(datetime: <a class="struct" href="naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a>, offset: Tz::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h4></section></summary><div class="docblock"><p>Makes a new <code>DateTime</code> with given <em>UTC</em> datetime and offset.
The local datetime should be constructed via the <code>TimeZone</code> trait.</p>
<h5 id="example"><a href="#example">Example</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">chrono</span>::{<span class="ident">DateTime</span>, <span class="ident">TimeZone</span>, <span class="ident">NaiveDateTime</span>, <span class="ident">Utc</span>};
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">DateTime</span>::<span class="op"><</span><span class="ident">Utc</span><span class="op">></span><span class="ident">::from_utc</span>(<span class="ident">NaiveDateTime::from_timestamp</span>(<span class="number">61</span>, <span class="number">0</span>), <span class="ident">Utc</span>);
<span class="macro">assert_eq!</span>(<span class="ident">Utc</span>.<span class="ident">timestamp</span>(<span class="number">61</span>, <span class="number">0</span>), <span class="ident">dt</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.date" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#101-103">source</a></span><a href="#method.date" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.date" class="fnname">date</a>(&self) -> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h4></section></summary><div class="docblock"><p>Retrieves a date component.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.time" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#108-110">source</a></span><a href="#method.time" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.time" class="fnname">time</a>(&self) -> <a class="struct" href="naive/struct.NaiveTime.html" title="struct chrono::naive::NaiveTime">NaiveTime</a></h4></section></summary><div class="docblock"><p>Retrieves a time component.
Unlike <code>date</code>, this is not associated to the time zone.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.timestamp" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#115-117">source</a></span><a href="#method.timestamp" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.timestamp" class="fnname">timestamp</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><div class="docblock"><p>Returns the number of non-leap seconds since January 1, 1970 0:00:00 UTC
(aka “UNIX timestamp”).</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.timestamp_millis" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#139-141">source</a></span><a href="#method.timestamp_millis" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.timestamp_millis" class="fnname">timestamp_millis</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><div class="docblock"><p>Returns the number of non-leap-milliseconds since January 1, 1970 UTC</p>
<p>Note that this does reduce the number of years that can be represented
from ~584 Billion to ~584 Million. (If this is a problem, please file
an issue to let me know what domain needs millisecond precision over
billions of years, I’m curious.)</p>
<h5 id="example-1"><a href="#example-1">Example</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">chrono::Utc</span>;
<span class="kw">use</span> <span class="ident">chrono::TimeZone</span>;
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">Utc</span>.<span class="ident">ymd</span>(<span class="number">1970</span>, <span class="number">1</span>, <span class="number">1</span>).<span class="ident">and_hms_milli</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">444</span>);
<span class="macro">assert_eq!</span>(<span class="ident">dt</span>.<span class="ident">timestamp_millis</span>(), <span class="number">1_444</span>);
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">Utc</span>.<span class="ident">ymd</span>(<span class="number">2001</span>, <span class="number">9</span>, <span class="number">9</span>).<span class="ident">and_hms_milli</span>(<span class="number">1</span>, <span class="number">46</span>, <span class="number">40</span>, <span class="number">555</span>);
<span class="macro">assert_eq!</span>(<span class="ident">dt</span>.<span class="ident">timestamp_millis</span>(), <span class="number">1_000_000_000_555</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.timestamp_nanos" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#163-165">source</a></span><a href="#method.timestamp_nanos" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.timestamp_nanos" class="fnname">timestamp_nanos</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><div class="docblock"><p>Returns the number of non-leap-nanoseconds since January 1, 1970 UTC</p>
<p>Note that this does reduce the number of years that can be represented
from ~584 Billion to ~584. (If this is a problem, please file
an issue to let me know what domain needs nanosecond precision over
millennia, I’m curious.)</p>
<h5 id="example-2"><a href="#example-2">Example</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">chrono::Utc</span>;
<span class="kw">use</span> <span class="ident">chrono::TimeZone</span>;
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">Utc</span>.<span class="ident">ymd</span>(<span class="number">1970</span>, <span class="number">1</span>, <span class="number">1</span>).<span class="ident">and_hms_nano</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">444</span>);
<span class="macro">assert_eq!</span>(<span class="ident">dt</span>.<span class="ident">timestamp_nanos</span>(), <span class="number">1_000_000_444</span>);
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">Utc</span>.<span class="ident">ymd</span>(<span class="number">2001</span>, <span class="number">9</span>, <span class="number">9</span>).<span class="ident">and_hms_nano</span>(<span class="number">1</span>, <span class="number">46</span>, <span class="number">40</span>, <span class="number">555</span>);
<span class="macro">assert_eq!</span>(<span class="ident">dt</span>.<span class="ident">timestamp_nanos</span>(), <span class="number">1_000_000_000_000_000_555</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.timestamp_subsec_millis" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#173-175">source</a></span><a href="#method.timestamp_subsec_millis" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.timestamp_subsec_millis" class="fnname">timestamp_subsec_millis</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Returns the number of milliseconds since the last second boundary</p>
<p>warning: in event of a leap second, this may exceed 999</p>
<p>note: this is not the number of milliseconds since January 1, 1970 0:00:00 UTC</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.timestamp_subsec_micros" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#183-185">source</a></span><a href="#method.timestamp_subsec_micros" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.timestamp_subsec_micros" class="fnname">timestamp_subsec_micros</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Returns the number of microseconds since the last second boundary</p>
<p>warning: in event of a leap second, this may exceed 999_999</p>
<p>note: this is not the number of microseconds since January 1, 1970 0:00:00 UTC</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.timestamp_subsec_nanos" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#193-195">source</a></span><a href="#method.timestamp_subsec_nanos" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.timestamp_subsec_nanos" class="fnname">timestamp_subsec_nanos</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Returns the number of nanoseconds since the last second boundary</p>
<p>warning: in event of a leap second, this may exceed 999_999_999</p>
<p>note: this is not the number of nanoseconds since January 1, 1970 0:00:00 UTC</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.offset" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#199-201">source</a></span><a href="#method.offset" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.offset" class="fnname">offset</a>(&self) -> &Tz::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a></h4></section></summary><div class="docblock"><p>Retrieves an associated offset from UTC.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.timezone" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#205-207">source</a></span><a href="#method.timezone" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.timezone" class="fnname">timezone</a>(&self) -> Tz</h4></section></summary><div class="docblock"><p>Retrieves an associated time zone.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_timezone" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#212-214">source</a></span><a href="#method.with_timezone" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.with_timezone" class="fnname">with_timezone</a><Tz2: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>(&self, tz: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Tz2) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz2></h4></section></summary><div class="docblock"><p>Changes the associated time zone.
This does not change the actual <code>DateTime</code> (but will change the string representation).</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.checked_add_signed" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#220-224">source</a></span><a href="#method.checked_add_signed" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.checked_add_signed" class="fnname">checked_add_signed</a>(self, rhs: <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">OldDuration</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class="docblock"><p>Adds given <code>Duration</code> to the current date and time.</p>
<p>Returns <code>None</code> when it will result in overflow.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.checked_sub_signed" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#230-234">source</a></span><a href="#method.checked_sub_signed" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.checked_sub_signed" class="fnname">checked_sub_signed</a>(self, rhs: <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">OldDuration</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class="docblock"><p>Subtracts given <code>Duration</code> from the current date and time.</p>
<p>Returns <code>None</code> when it will result in overflow.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.signed_duration_since" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#239-241">source</a></span><a href="#method.signed_duration_since" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.signed_duration_since" class="fnname">signed_duration_since</a><Tz2: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>(<br> self, <br> rhs: <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz2><br>) -> <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">OldDuration</a></h4></section></summary><div class="docblock"><p>Subtracts another <code>DateTime</code> from the current date and time.
This does not overflow or underflow at all.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.naive_utc" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#245-247">source</a></span><a href="#method.naive_utc" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.naive_utc" class="fnname">naive_utc</a>(&self) -> <a class="struct" href="naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a></h4></section></summary><div class="docblock"><p>Returns a view to the naive UTC datetime.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.naive_local" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#251-253">source</a></span><a href="#method.naive_local" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.naive_local" class="fnname">naive_local</a>(&self) -> <a class="struct" href="naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a></h4></section></summary><div class="docblock"><p>Returns a view to the naive local datetime.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-1" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#333-391">source</a></span><a href="#impl-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.parse_from_rfc2822" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#347-352">source</a></span><a href="#method.parse_from_rfc2822" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.parse_from_rfc2822" class="fnname">parse_from_rfc2822</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/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><<a class="struct" href="offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>>></h4></section></summary><div class="docblock"><p>Parses an RFC 2822 date and time string such as <code>Tue, 1 Jul 2003 10:52:37 +0200</code>,
then returns a new <code>DateTime</code> with a parsed <code>FixedOffset</code>.</p>
<p>RFC 2822 is the internet message standard that specifices the
representation of times in HTTP and email headers.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>(
<span class="ident">DateTime::parse_from_rfc2822</span>(<span class="string">"Wed, 18 Feb 2015 23:16:09 GMT"</span>).<span class="ident">unwrap</span>(),
<span class="ident">FixedOffset::east</span>(<span class="number">0</span>).<span class="ident">ymd</span>(<span class="number">2015</span>, <span class="number">2</span>, <span class="number">18</span>).<span class="ident">and_hms</span>(<span class="number">23</span>, <span class="number">16</span>, <span class="number">9</span>)
);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.parse_from_rfc3339" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#359-364">source</a></span><a href="#method.parse_from_rfc3339" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.parse_from_rfc3339" class="fnname">parse_from_rfc3339</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/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><<a class="struct" href="offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>>></h4></section></summary><div class="docblock"><p>Parses an RFC 3339 and ISO 8601 date and time string such as <code>1996-12-19T16:39:57-08:00</code>,
then returns a new <code>DateTime</code> with a parsed <code>FixedOffset</code>.</p>
<p>Why isn’t this named <code>parse_from_iso8601</code>? That’s because ISO 8601 allows some freedom
over the syntax and RFC 3339 exercises that freedom to rigidly define a fixed format.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.parse_from_str" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#386-390">source</a></span><a href="#method.parse_from_str" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.parse_from_str" class="fnname">parse_from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, fmt: &<a class="primitive" href="https://doc.rust-lang.org/nightly/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><<a class="struct" href="offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>>></h4></section></summary><div class="docblock"><p>Parses a string with the specified format string and
returns a new <code>DateTime</code> with a parsed <code>FixedOffset</code>.
See the <a href="./format/strftime/index.html"><code>format::strftime</code> module</a>
on the supported escape sequences.</p>
<p>See also <code>Offset::datetime_from_str</code> which gives a local <code>DateTime</code> on specific time zone.</p>
<p>Note that this method <em>requires a timezone</em> in the string. See
<a href="./naive/struct.NaiveDateTime.html#method.parse_from_str"><code>NaiveDateTime::parse_from_str</code></a>
for a version that does not require a timezone in the to-be-parsed str.</p>
<h5 id="example-3"><a href="#example-3">Example</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">chrono</span>::{<span class="ident">DateTime</span>, <span class="ident">FixedOffset</span>, <span class="ident">TimeZone</span>};
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">DateTime::parse_from_str</span>(
<span class="string">"1983 Apr 13 12:09:14.274 +0000"</span>, <span class="string">"%Y %b %d %H:%M:%S%.3f %z"</span>);
<span class="macro">assert_eq!</span>(<span class="ident">dt</span>, <span class="prelude-val">Ok</span>(<span class="ident">FixedOffset::east</span>(<span class="number">0</span>).<span class="ident">ymd</span>(<span class="number">1983</span>, <span class="number">4</span>, <span class="number">13</span>).<span class="ident">and_hms_milli</span>(<span class="number">12</span>, <span class="number">9</span>, <span class="number">14</span>, <span class="number">274</span>)));</code></pre></div>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-2" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#393-533">source</a></span><a href="#impl-2" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz> <span class="where fmt-newline">where<br> Tz::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_rfc2822" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#399-402">source</a></span><a href="#method.to_rfc2822" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.to_rfc2822" class="fnname">to_rfc2822</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Returns an RFC 2822 date and time string such as <code>Tue, 1 Jul 2003 10:52:37 +0200</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_rfc3339" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#406-409">source</a></span><a href="#method.to_rfc3339" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.to_rfc3339" class="fnname">to_rfc3339</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Returns an RFC 3339 and ISO 8601 date and time string such as <code>1996-12-19T16:39:57-08:00</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_rfc3339_opts" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#436-476">source</a></span><a href="#method.to_rfc3339_opts" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.to_rfc3339_opts" class="fnname">to_rfc3339_opts</a>(&self, secform: <a class="enum" href="enum.SecondsFormat.html" title="enum chrono::SecondsFormat">SecondsFormat</a>, use_z: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Return an RFC 3339 and ISO 8601 date and time string with subseconds
formatted as per a <code>SecondsFormat</code>. If passed <code>use_z</code> true and the
timezone is UTC (offset 0), use ‘Z’, as per
<a href="format/enum.Fixed.html#variant.TimezoneOffsetColonZ">Fixed::TimezoneOffsetColonZ</a>.
If passed <code>use_z</code> false, use
<a href="format/enum.Fixed.html#variant.TimezoneOffsetColon">Fixed::TimezoneOffsetColon</a>.</p>
<h5 id="examples"><a href="#examples">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">Utc</span>.<span class="ident">ymd</span>(<span class="number">2018</span>, <span class="number">1</span>, <span class="number">26</span>).<span class="ident">and_hms_micro</span>(<span class="number">18</span>, <span class="number">30</span>, <span class="number">9</span>, <span class="number">453_829</span>);
<span class="macro">assert_eq!</span>(<span class="ident">dt</span>.<span class="ident">to_rfc3339_opts</span>(<span class="ident">SecondsFormat::Millis</span>, <span class="bool-val">false</span>),
<span class="string">"2018-01-26T18:30:09.453+00:00"</span>);
<span class="macro">assert_eq!</span>(<span class="ident">dt</span>.<span class="ident">to_rfc3339_opts</span>(<span class="ident">SecondsFormat::Millis</span>, <span class="bool-val">true</span>),
<span class="string">"2018-01-26T18:30:09.453Z"</span>);
<span class="macro">assert_eq!</span>(<span class="ident">dt</span>.<span class="ident">to_rfc3339_opts</span>(<span class="ident">SecondsFormat::Secs</span>, <span class="bool-val">true</span>),
<span class="string">"2018-01-26T18:30:09Z"</span>);
<span class="kw">let</span> <span class="ident">pst</span> <span class="op">=</span> <span class="ident">FixedOffset::east</span>(<span class="number">8</span> <span class="op">*</span> <span class="number">60</span> <span class="op">*</span> <span class="number">60</span>);
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">pst</span>.<span class="ident">ymd</span>(<span class="number">2018</span>, <span class="number">1</span>, <span class="number">26</span>).<span class="ident">and_hms_micro</span>(<span class="number">10</span>, <span class="number">30</span>, <span class="number">9</span>, <span class="number">453_829</span>);
<span class="macro">assert_eq!</span>(<span class="ident">dt</span>.<span class="ident">to_rfc3339_opts</span>(<span class="ident">SecondsFormat::Secs</span>, <span class="bool-val">true</span>),
<span class="string">"2018-01-26T10:30:09+08:00"</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.format_with_items" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#481-488">source</a></span><a href="#method.format_with_items" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.format_with_items" class="fnname">format_with_items</a><'a, I, B>(&self, items: I) -> <a class="struct" href="format/struct.DelayedFormat.html" title="struct chrono::format::DelayedFormat">DelayedFormat</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = B> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br> B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="enum" href="format/enum.Item.html" title="enum chrono::format::Item">Item</a><'a>>, </span></h4></section></summary><div class="docblock"><p>Formats the combined date and time with the specified formatting items.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.format" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#495-497">source</a></span><a href="#method.format" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.format" class="fnname">format</a><'a>(&self, fmt: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="struct" href="format/struct.DelayedFormat.html" title="struct chrono::format::DelayedFormat">DelayedFormat</a><<a class="struct" href="format/strftime/struct.StrftimeItems.html" title="struct chrono::format::strftime::StrftimeItems">StrftimeItems</a><'a>></h4></section></summary><div class="docblock"><p>Formats the combined date and time with the specified format string.
See the <a href="./format/strftime/index.html"><code>format::strftime</code> module</a>
on the supported escape sequences.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Add%3CDuration%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#693-700">source</a></span><a href="#impl-Add%3CDuration%3E" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a><<a class="struct" href="struct.Duration.html" title="struct chrono::Duration">Duration</a>> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-2" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h4></section></summary><div class='docblock'><p>The resulting type after applying the <code>+</code> operator.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#697-699">source</a></span><a href="#method.add-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#tymethod.add" class="fnname">add</a>(self, rhs: <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">OldDuration</a>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h4></section></summary><div class='docblock'><p>Performs the <code>+</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#tymethod.add">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Add%3CFixedOffset%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/offset/fixed.rs.html#200-207">source</a></span><a href="#impl-Add%3CFixedOffset%3E" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a><<a class="struct" href="offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h4></section></summary><div class='docblock'><p>The resulting type after applying the <code>+</code> operator.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/offset/fixed.rs.html#204-206">source</a></span><a href="#method.add" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#tymethod.add" class="fnname">add</a>(self, rhs: <a class="struct" href="offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h4></section></summary><div class='docblock'><p>Performs the <code>+</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#tymethod.add">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#69">source</a></span><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz> <span class="where fmt-newline">where<br> Tz::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#69">source</a></span><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h4></section></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Datelike" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#535-607">source</a></span><a href="#impl-Datelike" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="trait.Datelike.html" title="trait chrono::Datelike">Datelike</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.year" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#537-539">source</a></span><a href="#method.year" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.year" class="fnname">year</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section></summary><div class='docblock'><p>Returns the year number in the <a href="./naive/struct.NaiveDate.html#calendar-date">calendar date</a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.month" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#541-543">source</a></span><a href="#method.month" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.month" class="fnname">month</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'><p>Returns the month number starting from 1. <a href="trait.Datelike.html#tymethod.month">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.month0" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#545-547">source</a></span><a href="#method.month0" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.month0" class="fnname">month0</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'><p>Returns the month number starting from 0. <a href="trait.Datelike.html#tymethod.month0">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.day" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#549-551">source</a></span><a href="#method.day" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.day" class="fnname">day</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'><p>Returns the day of month starting from 1. <a href="trait.Datelike.html#tymethod.day">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.day0" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#553-555">source</a></span><a href="#method.day0" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.day0" class="fnname">day0</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'><p>Returns the day of month starting from 0. <a href="trait.Datelike.html#tymethod.day0">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ordinal" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#557-559">source</a></span><a href="#method.ordinal" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.ordinal" class="fnname">ordinal</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'><p>Returns the day of year starting from 1. <a href="trait.Datelike.html#tymethod.ordinal">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ordinal0" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#561-563">source</a></span><a href="#method.ordinal0" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.ordinal0" class="fnname">ordinal0</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'><p>Returns the day of year starting from 0. <a href="trait.Datelike.html#tymethod.ordinal0">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.weekday" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#565-567">source</a></span><a href="#method.weekday" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.weekday" class="fnname">weekday</a>(&self) -> <a class="enum" href="enum.Weekday.html" title="enum chrono::Weekday">Weekday</a></h4></section></summary><div class='docblock'><p>Returns the day of week.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.iso_week" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#569-571">source</a></span><a href="#method.iso_week" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.iso_week" class="fnname">iso_week</a>(&self) -> <a class="struct" href="naive/struct.IsoWeek.html" title="struct chrono::naive::IsoWeek">IsoWeek</a></h4></section></summary><div class='docblock'><p>Returns the ISO week.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_year" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#574-576">source</a></span><a href="#method.with_year" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.with_year" class="fnname">with_year</a>(&self, year: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class='docblock'><p>Makes a new value with the year number changed. <a href="trait.Datelike.html#tymethod.with_year">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_month" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#579-581">source</a></span><a href="#method.with_month" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.with_month" class="fnname">with_month</a>(&self, month: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class='docblock'><p>Makes a new value with the month number (starting from 1) changed. <a href="trait.Datelike.html#tymethod.with_month">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_month0" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#584-586">source</a></span><a href="#method.with_month0" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.with_month0" class="fnname">with_month0</a>(&self, month0: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class='docblock'><p>Makes a new value with the month number (starting from 0) changed. <a href="trait.Datelike.html#tymethod.with_month0">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_day" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#589-591">source</a></span><a href="#method.with_day" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.with_day" class="fnname">with_day</a>(&self, day: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class='docblock'><p>Makes a new value with the day of month (starting from 1) changed. <a href="trait.Datelike.html#tymethod.with_day">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_day0" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#594-596">source</a></span><a href="#method.with_day0" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.with_day0" class="fnname">with_day0</a>(&self, day0: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class='docblock'><p>Makes a new value with the day of month (starting from 0) changed. <a href="trait.Datelike.html#tymethod.with_day0">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_ordinal" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#599-601">source</a></span><a href="#method.with_ordinal" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.with_ordinal" class="fnname">with_ordinal</a>(&self, ordinal: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class='docblock'><p>Makes a new value with the day of year (starting from 1) changed. <a href="trait.Datelike.html#tymethod.with_ordinal">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_ordinal0" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#604-606">source</a></span><a href="#method.with_ordinal0" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.with_ordinal0" class="fnname">with_ordinal0</a>(&self, ordinal0: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class='docblock'><p>Makes a new value with the day of year (starting from 0) changed. <a href="trait.Datelike.html#tymethod.with_ordinal0">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.year_ce" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/lib.rs.html#1252-1259">source</a></span><a href="#method.year_ce" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#method.year_ce" class="fnname">year_ce</a>(&self) -> (<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class='docblock'><p>Returns the absolute year number starting from 1 with a boolean flag,
which is false when the year predates the epoch (BCE/BC) and true otherwise (CE/AD). <a href="trait.Datelike.html#method.year_ce">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.num_days_from_ce" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/lib.rs.html#1344-1359">source</a></span><a href="#method.num_days_from_ce" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#method.num_days_from_ce" class="fnname">num_days_from_ce</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section></summary><div class='docblock'><p>Counts the days in the proleptic Gregorian calendar, with January 1, Year 1 (CE) as day 1. <a href="trait.Datelike.html#method.num_days_from_ce">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#720-724">source</a></span><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#721-723">source</a></span><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Display" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#726-733">source</a></span><a href="#impl-Display" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz> <span class="where fmt-newline">where<br> Tz::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#730-732">source</a></span><a href="#method.fmt-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-DurationRound" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/round.rs.html#149-200">source</a></span><a href="#impl-DurationRound" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="trait.DurationRound.html" title="trait chrono::DurationRound">DurationRound</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Err-3" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Err-3" class="anchor"></a><h4 class="code-header">type <a href="trait.DurationRound.html#associatedtype.Err" class="associatedtype">Err</a> = <a class="enum" href="enum.RoundingError.html" title="enum chrono::RoundingError">RoundingError</a></h4></section></summary><div class='docblock'><p>Error that can occur in rounding or truncating</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.duration_round" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/round.rs.html#152-179">source</a></span><a href="#method.duration_round" class="anchor"></a><h4 class="code-header">fn <a href="trait.DurationRound.html#tymethod.duration_round" class="fnname">duration_round</a>(self, duration: <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">Duration</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, Self::<a class="associatedtype" href="trait.DurationRound.html#associatedtype.Err" title="type chrono::DurationRound::Err">Err</a>></h4></section></summary><div class='docblock'><p>Return a copy rounded by Duration. <a href="trait.DurationRound.html#tymethod.duration_round">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.duration_trunc" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/round.rs.html#181-199">source</a></span><a href="#method.duration_trunc" class="anchor"></a><h4 class="code-header">fn <a href="trait.DurationRound.html#tymethod.duration_trunc" class="fnname">duration_trunc</a>(self, duration: <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">Duration</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, Self::<a class="associatedtype" href="trait.DurationRound.html#associatedtype.Err" title="type chrono::DurationRound::Err">Err</a>></h4></section></summary><div class='docblock'><p>Return a copy truncated by Duration. <a href="trait.DurationRound.html#tymethod.duration_trunc">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CDateTime%3CFixedOffset%3E%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#279-287">source</a></span><a href="#impl-From%3CDateTime%3CFixedOffset%3E%3E" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>>> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>></h3></section></summary><div class="docblock"><p>Convert a <code>DateTime<FixedOffset></code> instance into a <code>DateTime<Utc></code> instance.</p>
</div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#284-286">source</a></span><a href="#method.from-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(src: <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>>) -> Self</h4></section></summary><div class="docblock"><p>Convert this <code>DateTime<FixedOffset></code> instance into a <code>DateTime<Utc></code> instance.</p>
<p>Conversion is performed via <a href="struct.DateTime.html#method.with_timezone" title="DateTime::with_timezone"><code>DateTime::with_timezone</code></a>, accounting for the timezone
difference.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CDateTime%3CFixedOffset%3E%3E-1" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#291-299">source</a></span><a href="#impl-From%3CDateTime%3CFixedOffset%3E%3E-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>>> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Local.html" title="struct chrono::offset::Local">Local</a>></h3></section></summary><div class="docblock"><p>Convert a <code>DateTime<FixedOffset></code> instance into a <code>DateTime<Local></code> instance.</p>
</div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#296-298">source</a></span><a href="#method.from-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(src: <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>>) -> Self</h4></section></summary><div class="docblock"><p>Convert this <code>DateTime<FixedOffset></code> instance into a <code>DateTime<Local></code> instance.</p>
<p>Conversion is performed via <a href="struct.DateTime.html#method.with_timezone" title="DateTime::with_timezone"><code>DateTime::with_timezone</code></a>. Returns the equivalent value in local
time.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CDateTime%3CLocal%3E%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#303-311">source</a></span><a href="#impl-From%3CDateTime%3CLocal%3E%3E" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Local.html" title="struct chrono::offset::Local">Local</a>>> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>></h3></section></summary><div class="docblock"><p>Convert a <code>DateTime<Local></code> instance into a <code>DateTime<Utc></code> instance.</p>
</div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#308-310">source</a></span><a href="#method.from-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(src: <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Local.html" title="struct chrono::offset::Local">Local</a>>) -> Self</h4></section></summary><div class="docblock"><p>Convert this <code>DateTime<Local></code> instance into a <code>DateTime<Utc></code> instance.</p>
<p>Conversion is performed via <a href="struct.DateTime.html#method.with_timezone" title="DateTime::with_timezone"><code>DateTime::with_timezone</code></a>, accounting for the difference in
timezones.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CDateTime%3CLocal%3E%3E-1" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#315-323">source</a></span><a href="#impl-From%3CDateTime%3CLocal%3E%3E-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Local.html" title="struct chrono::offset::Local">Local</a>>> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>></h3></section></summary><div class="docblock"><p>Convert a <code>DateTime<Local></code> instance into a <code>DateTime<FixedOffset></code> instance.</p>
</div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-5" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#320-322">source</a></span><a href="#method.from-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(src: <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Local.html" title="struct chrono::offset::Local">Local</a>>) -> Self</h4></section></summary><div class="docblock"><p>Convert this <code>DateTime<Local></code> instance into a <code>DateTime<FixedOffset></code> instance.</p>
<p>Conversion is performed via <a href="struct.DateTime.html#method.with_timezone" title="DateTime::with_timezone"><code>DateTime::with_timezone</code></a>. Note that the converted value returned
by this will be created with a fixed timezone offset of 0.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CDateTime%3CTz%3E%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#780-793">source</a></span><a href="#impl-From%3CDateTime%3CTz%3E%3E" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html" title="struct std::time::SystemTime">SystemTime</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-8" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#781-792">source</a></span><a href="#method.from-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(dt: <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html" title="struct std::time::SystemTime">SystemTime</a></h4></section></summary><div class='docblock'><p>Converts to this type from the input type.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CDateTime%3CUtc%3E%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#257-265">source</a></span><a href="#impl-From%3CDateTime%3CUtc%3E%3E" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>>> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>></h3></section></summary><div class="docblock"><p>Convert a <code>DateTime<Utc></code> instance into a <code>DateTime<FixedOffset></code> instance.</p>
</div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#262-264">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(src: <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>>) -> Self</h4></section></summary><div class="docblock"><p>Convert this <code>DateTime<Utc></code> instance into a <code>DateTime<FixedOffset></code> instance.</p>
<p>Conversion is done via <a href="struct.DateTime.html#method.with_timezone" title="DateTime::with_timezone"><code>DateTime::with_timezone</code></a>. Note that the converted value returned by
this will be created with a fixed timezone offset of 0.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CDateTime%3CUtc%3E%3E-1" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#269-276">source</a></span><a href="#impl-From%3CDateTime%3CUtc%3E%3E-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>>> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Local.html" title="struct chrono::offset::Local">Local</a>></h3></section></summary><div class="docblock"><p>Convert a <code>DateTime<Utc></code> instance into a <code>DateTime<Local></code> instance.</p>
</div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#273-275">source</a></span><a href="#method.from-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(src: <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>>) -> Self</h4></section></summary><div class="docblock"><p>Convert this <code>DateTime<Utc></code> instance into a <code>DateTime<Local></code> instance.</p>
<p>Conversion is performed via <a href="struct.DateTime.html#method.with_timezone" title="DateTime::with_timezone"><code>DateTime::with_timezone</code></a>, accounting for the difference in timezones.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CSystemTime%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#753-770">source</a></span><a href="#impl-From%3CSystemTime%3E" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html" title="struct std::time::SystemTime">SystemTime</a>> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-6" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#754-769">source</a></span><a href="#method.from-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html" title="struct std::time::SystemTime">SystemTime</a>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>></h4></section></summary><div class='docblock'><p>Converts to this type from the input type.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CSystemTime%3E-1" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#773-777">source</a></span><a href="#impl-From%3CSystemTime%3E-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html" title="struct std::time::SystemTime">SystemTime</a>> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Local.html" title="struct chrono::offset::Local">Local</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-7" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#774-776">source</a></span><a href="#method.from-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html" title="struct std::time::SystemTime">SystemTime</a>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Local.html" title="struct chrono::offset::Local">Local</a>></h4></section></summary><div class='docblock'><p>Converts to this type from the input type.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-FromStr" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#735-741">source</a></span><a href="#impl-FromStr" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html" title="trait core::str::traits::FromStr">FromStr</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Err" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Err" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#associatedtype.Err" class="associatedtype">Err</a> = <a class="struct" href="format/struct.ParseError.html" title="struct chrono::format::ParseError">ParseError</a></h4></section></summary><div class='docblock'><p>The associated error which can be returned from parsing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_str" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#738-740">source</a></span><a href="#method.from_str" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#tymethod.from_str" class="fnname">from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/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><<a class="struct" href="offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>>></h4></section></summary><div class='docblock'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#tymethod.from_str">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-FromStr-1" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#744-750">source</a></span><a href="#impl-FromStr-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html" title="trait core::str::traits::FromStr">FromStr</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.Local.html" title="struct chrono::offset::Local">Local</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Err-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Err-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#associatedtype.Err" class="associatedtype">Err</a> = <a class="struct" href="format/struct.ParseError.html" title="struct chrono::format::ParseError">ParseError</a></h4></section></summary><div class='docblock'><p>The associated error which can be returned from parsing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_str-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#747-749">source</a></span><a href="#method.from_str-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#tymethod.from_str" class="fnname">from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/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><<a class="struct" href="offset/struct.Local.html" title="struct chrono::offset::Local">Local</a>>></h4></section></summary><div class='docblock'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#tymethod.from_str">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-FromStr-2" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/format/parse.rs.html#458-499">source</a></span><a href="#impl-FromStr-2" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html" title="trait core::str::traits::FromStr">FromStr</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Err-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Err-2" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#associatedtype.Err" class="associatedtype">Err</a> = <a class="struct" href="format/struct.ParseError.html" title="struct chrono::format::ParseError">ParseError</a></h4></section></summary><div class='docblock'><p>The associated error which can be returned from parsing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_str-2" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/format/parse.rs.html#461-498">source</a></span><a href="#method.from_str-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#tymethod.from_str" class="fnname">from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/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><<a class="struct" href="offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>>></h4></section></summary><div class='docblock'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#tymethod.from_str">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Hash" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#687-691">source</a></span><a href="#impl-Hash" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#688-690">source</a></span><a href="#method.hash" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash" class="fnname">hash</a><H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>>(&self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>H)</h4></section></summary><div class='docblock'><p>Feeds this value into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#237-239">source</a></span><a href="#method.hash_slice" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice" class="fnname">hash_slice</a><H>(data: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[Self]</a>, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>H) <span class="where fmt-newline">where<br> H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>, </span></h4></section></summary><div class='docblock'><p>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Ord" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#681-685">source</a></span><a href="#impl-Ord" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#682-684">source</a></span><a href="#method.cmp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp" class="fnname">cmp</a>(&self, other: &<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'><p>This method returns an <a href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#796-798">source</a></span><a href="#method.max" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max" class="fnname">max</a>(self, other: Self) -> Self</h4></section></summary><div class='docblock'><p>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.min" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#816-818">source</a></span><a href="#method.min" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min" class="fnname">min</a>(self, other: Self) -> Self</h4></section></summary><div class='docblock'><p>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#841-843">source</a></span><a href="#method.clamp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp" class="fnname">clamp</a>(self, min: Self, max: Self) -> Self</h4></section></summary><div class='docblock'><p>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CDateTime%3CTz2%3E%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#652-656">source</a></span><a href="#impl-PartialEq%3CDateTime%3CTz2%3E%3E" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>, Tz2: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz2>> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#653-655">source</a></span><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz2>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#230">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CDateTime%3CTz2%3E%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#660-679">source</a></span><a href="#impl-PartialOrd%3CDateTime%3CTz2%3E%3E" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>, Tz2: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz2>> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#676-678">source</a></span><a href="#method.partial_cmp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&self, other: &<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz2>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class="docblock"><p>Compare two DateTimes based on their true time, ignoring time zones</p>
<h5 id="example-4"><a href="#example-4">Example</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">chrono::prelude</span>::<span class="kw-2">*</span>;
<span class="kw">let</span> <span class="ident">earlier</span> <span class="op">=</span> <span class="ident">Utc</span>.<span class="ident">ymd</span>(<span class="number">2015</span>, <span class="number">5</span>, <span class="number">15</span>).<span class="ident">and_hms</span>(<span class="number">2</span>, <span class="number">0</span>, <span class="number">0</span>).<span class="ident">with_timezone</span>(<span class="kw-2">&</span><span class="ident">FixedOffset::west</span>(<span class="number">1</span> <span class="op">*</span> <span class="number">3600</span>));
<span class="kw">let</span> <span class="ident">later</span> <span class="op">=</span> <span class="ident">Utc</span>.<span class="ident">ymd</span>(<span class="number">2015</span>, <span class="number">5</span>, <span class="number">15</span>).<span class="ident">and_hms</span>(<span class="number">3</span>, <span class="number">0</span>, <span class="number">0</span>).<span class="ident">with_timezone</span>(<span class="kw-2">&</span><span class="ident">FixedOffset::west</span>(<span class="number">5</span> <span class="op">*</span> <span class="number">3600</span>));
<span class="macro">assert_eq!</span>(<span class="ident">earlier</span>.<span class="ident">to_string</span>(), <span class="string">"2015-05-15 01:00:00 -01:00"</span>);
<span class="macro">assert_eq!</span>(<span class="ident">later</span>.<span class="ident">to_string</span>(), <span class="string">"2015-05-14 22:00:00 -05:00"</span>);
<span class="macro">assert!</span>(<span class="ident">later</span> <span class="op">></span> <span class="ident">earlier</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1100">source</a></span><a href="#method.lt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.le" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code>
operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1141">source</a></span><a href="#method.gt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1160">source</a></span><a href="#method.ge" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code>
operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Sub%3CDateTime%3CTz%3E%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#711-718">source</a></span><a href="#impl-Sub%3CDateTime%3CTz%3E%3E" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-4" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-4" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">Duration</a></h4></section></summary><div class='docblock'><p>The resulting type after applying the <code>-</code> operator.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sub-2" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#715-717">source</a></span><a href="#method.sub-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub" class="fnname">sub</a>(self, rhs: <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>) -> <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">OldDuration</a></h4></section></summary><div class='docblock'><p>Performs the <code>-</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Sub%3CDuration%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#702-709">source</a></span><a href="#impl-Sub%3CDuration%3E" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a><<a class="struct" href="struct.Duration.html" title="struct chrono::Duration">Duration</a>> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-3" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-3" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h4></section></summary><div class='docblock'><p>The resulting type after applying the <code>-</code> operator.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sub-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#706-708">source</a></span><a href="#method.sub-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub" class="fnname">sub</a>(self, rhs: <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">OldDuration</a>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h4></section></summary><div class='docblock'><p>Performs the <code>-</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Sub%3CFixedOffset%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/offset/fixed.rs.html#209-216">source</a></span><a href="#impl-Sub%3CFixedOffset%3E" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a><<a class="struct" href="offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h4></section></summary><div class='docblock'><p>The resulting type after applying the <code>-</code> operator.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sub" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/offset/fixed.rs.html#213-215">source</a></span><a href="#method.sub" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub" class="fnname">sub</a>(self, rhs: <a class="struct" href="offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h4></section></summary><div class='docblock'><p>Performs the <code>-</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Timelike" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#609-646">source</a></span><a href="#impl-Timelike" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="trait.Timelike.html" title="trait chrono::Timelike">Timelike</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hour" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#611-613">source</a></span><a href="#method.hour" class="anchor"></a><h4 class="code-header">fn <a href="trait.Timelike.html#tymethod.hour" class="fnname">hour</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'><p>Returns the hour number from 0 to 23.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.minute" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#615-617">source</a></span><a href="#method.minute" class="anchor"></a><h4 class="code-header">fn <a href="trait.Timelike.html#tymethod.minute" class="fnname">minute</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'><p>Returns the minute number from 0 to 59.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.second" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#619-621">source</a></span><a href="#method.second" class="anchor"></a><h4 class="code-header">fn <a href="trait.Timelike.html#tymethod.second" class="fnname">second</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'><p>Returns the second number from 0 to 59.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.nanosecond" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#623-625">source</a></span><a href="#method.nanosecond" class="anchor"></a><h4 class="code-header">fn <a href="trait.Timelike.html#tymethod.nanosecond" class="fnname">nanosecond</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'><p>Returns the number of nanoseconds since the whole non-leap second.
The range from 1,000,000,000 to 1,999,999,999 represents
the <a href="./naive/struct.NaiveTime.html#leap-second-handling">leap second</a>. <a href="trait.Timelike.html#tymethod.nanosecond">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_hour" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#628-630">source</a></span><a href="#method.with_hour" class="anchor"></a><h4 class="code-header">fn <a href="trait.Timelike.html#tymethod.with_hour" class="fnname">with_hour</a>(&self, hour: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class='docblock'><p>Makes a new value with the hour number changed. <a href="trait.Timelike.html#tymethod.with_hour">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_minute" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#633-635">source</a></span><a href="#method.with_minute" class="anchor"></a><h4 class="code-header">fn <a href="trait.Timelike.html#tymethod.with_minute" class="fnname">with_minute</a>(&self, min: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class='docblock'><p>Makes a new value with the minute number changed. <a href="trait.Timelike.html#tymethod.with_minute">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_second" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#638-640">source</a></span><a href="#method.with_second" class="anchor"></a><h4 class="code-header">fn <a href="trait.Timelike.html#tymethod.with_second" class="fnname">with_second</a>(&self, sec: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class='docblock'><p>Makes a new value with the second number changed. <a href="trait.Timelike.html#tymethod.with_second">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_nanosecond" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#643-645">source</a></span><a href="#method.with_nanosecond" class="anchor"></a><h4 class="code-header">fn <a href="trait.Timelike.html#tymethod.with_nanosecond" class="fnname">with_nanosecond</a>(&self, nano: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class='docblock'><p>Makes a new value with nanoseconds since the whole non-leap second changed. <a href="trait.Timelike.html#tymethod.with_nanosecond">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hour12" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/lib.rs.html#1370-1377">source</a></span><a href="#method.hour12" class="anchor"></a><h4 class="code-header">fn <a href="trait.Timelike.html#method.hour12" class="fnname">hour12</a>(&self) -> (<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class='docblock'><p>Returns the hour number from 1 to 12 with a boolean flag,
which is false for AM and true for PM. <a href="trait.Timelike.html#method.hour12">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.num_seconds_from_midnight" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/lib.rs.html#1416-1418">source</a></span><a href="#method.num_seconds_from_midnight" class="anchor"></a><h4 class="code-header">fn <a href="trait.Timelike.html#method.num_seconds_from_midnight" class="fnname">num_seconds_from_midnight</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'><p>Returns the number of non-leap seconds past the last midnight.</p>
</div></details></div></details><section id="impl-Copy" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#649">source</a></span><a href="#impl-Copy" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz> <span class="where fmt-newline">where<br> <Tz as <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>, </span></h3></section><section id="impl-Eq" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#658">source</a></span><a href="#impl-Eq" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h3></section><section id="impl-Send" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/chrono/datetime.rs.html#650">source</a></span><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz> <span class="where fmt-newline">where<br> <Tz as <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </span></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe" class="impl has-srclink"><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl<Tz> <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz> <span class="where fmt-newline">where<br> <Tz as <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>, </span></h3></section><section id="impl-Sync" class="impl has-srclink"><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl<Tz> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz> <span class="where fmt-newline">where<br> <Tz as <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </span></h3></section><section id="impl-Unpin" class="impl has-srclink"><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl<Tz> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz> <span class="where fmt-newline">where<br> <Tz as <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></h3></section><section id="impl-UnwindSafe" class="impl has-srclink"><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl<Tz> <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz> <span class="where fmt-newline">where<br> <Tz as <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>, </span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#203">source</a></span><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#204">source</a></span><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#209">source</a></span><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218">source</a></span><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#557">source</a></span><a href="#impl-From%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-9" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#559">source</a></span><a href="#method.from-9" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541">source</a></span><a href="#impl-Into%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#549">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#83">source</a></span><a href="#impl-ToOwned" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'><p>The resulting type after obtaining ownership.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#88">source</a></span><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#92">source</a></span><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToString" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2479">source</a></span><a href="#impl-ToString" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_string" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2485">source</a></span><a href="#method.to_string" class="anchor"></a><h4 class="code-header">default fn <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string" class="fnname">to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#598">source</a></span><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#604">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'><p>Performs the conversion.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#583">source</a></span><a href="#impl-TryInto%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'><p>Performs the conversion.</p>
</div></details></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="chrono" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0-nightly (495b21669 2022-07-03)" ></div>
</body></html>