Files
google-apis-rs/chrono/offset/trait.TimeZone.html
2024-03-05 21:06:01 +01:00

199 lines
48 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The time zone."><title>TimeZone in chrono::offset - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="chrono" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../chrono/index.html">chrono</a><span class="version">0.4.31</span></h2></div><h2 class="location"><a href="#">TimeZone</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Offset">Offset</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.from_offset">from_offset</a></li><li><a href="#tymethod.offset_from_local_date">offset_from_local_date</a></li><li><a href="#tymethod.offset_from_local_datetime">offset_from_local_datetime</a></li><li><a href="#tymethod.offset_from_utc_date">offset_from_utc_date</a></li><li><a href="#tymethod.offset_from_utc_datetime">offset_from_utc_datetime</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.datetime_from_str">datetime_from_str</a></li><li><a href="#method.from_local_date">from_local_date</a></li><li><a href="#method.from_local_datetime">from_local_datetime</a></li><li><a href="#method.from_utc_date">from_utc_date</a></li><li><a href="#method.from_utc_datetime">from_utc_datetime</a></li><li><a href="#method.isoywd">isoywd</a></li><li><a href="#method.isoywd_opt">isoywd_opt</a></li><li><a href="#method.timestamp">timestamp</a></li><li><a href="#method.timestamp_micros">timestamp_micros</a></li><li><a href="#method.timestamp_millis">timestamp_millis</a></li><li><a href="#method.timestamp_millis_opt">timestamp_millis_opt</a></li><li><a href="#method.timestamp_nanos">timestamp_nanos</a></li><li><a href="#method.timestamp_opt">timestamp_opt</a></li><li><a href="#method.with_ymd_and_hms">with_ymd_and_hms</a></li><li><a href="#method.ymd">ymd</a></li><li><a href="#method.ymd_opt">ymd_opt</a></li><li><a href="#method.yo">yo</a></li><li><a href="#method.yo_opt">yo_opt</a></li></ul><h3><a href="#object-safety">Object Safety</a></h3><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In chrono::offset</a></h2></div></nav><div class="sidebar-resizer"></div>
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../chrono/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">chrono</a>::<wbr><a href="index.html">offset</a>::<wbr><a class="trait" href="#">TimeZone</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/chrono/offset/mod.rs.html#216-528">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait TimeZone: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> {
type <a href="#associatedtype.Offset" class="associatedtype">Offset</a>: <a class="trait" href="trait.Offset.html" title="trait chrono::offset::Offset">Offset</a>;
<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 23 methods</span></summary> // Required methods
fn <a href="#tymethod.from_offset" class="fn">from_offset</a>(offset: &amp;Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>) -&gt; Self;
<span class="item-spacer"></span> fn <a href="#tymethod.offset_from_local_date" class="fn">offset_from_local_date</a>(
&amp;self,
local: &amp;<a class="struct" href="../naive/struct.NaiveDate.html" title="struct chrono::naive::NaiveDate">NaiveDate</a>
) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.offset_from_local_datetime" class="fn">offset_from_local_datetime</a>(
&amp;self,
local: &amp;<a class="struct" href="../naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a>
) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.offset_from_utc_date" class="fn">offset_from_utc_date</a>(&amp;self, utc: &amp;<a class="struct" href="../naive/struct.NaiveDate.html" title="struct chrono::naive::NaiveDate">NaiveDate</a>) -&gt; Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.offset_from_utc_datetime" class="fn">offset_from_utc_datetime</a>(&amp;self, utc: &amp;<a class="struct" href="../naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a>) -&gt; Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>;
// Provided methods
fn <a href="#method.with_ymd_and_hms" class="fn">with_ymd_and_hms</a>(
&amp;self,
year: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i32.html">i32</a>,
month: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>,
day: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>,
hour: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>,
min: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>,
sec: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>
) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt;&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.ymd" class="fn">ymd</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i32.html">i32</a>, month: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>, day: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>) -&gt; <a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.ymd_opt" class="fn">ymd_opt</a>(
&amp;self,
year: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i32.html">i32</a>,
month: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>,
day: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>
) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt;&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.yo" class="fn">yo</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i32.html">i32</a>, ordinal: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>) -&gt; <a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.yo_opt" class="fn">yo_opt</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i32.html">i32</a>, ordinal: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt;&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.isoywd" class="fn">isoywd</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i32.html">i32</a>, week: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>, weekday: <a class="enum" href="../enum.Weekday.html" title="enum chrono::Weekday">Weekday</a>) -&gt; <a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.isoywd_opt" class="fn">isoywd_opt</a>(
&amp;self,
year: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i32.html">i32</a>,
week: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>,
weekday: <a class="enum" href="../enum.Weekday.html" title="enum chrono::Weekday">Weekday</a>
) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt;&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.timestamp" class="fn">timestamp</a>(&amp;self, secs: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i64.html">i64</a>, nsecs: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>) -&gt; <a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.timestamp_opt" class="fn">timestamp_opt</a>(
&amp;self,
secs: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i64.html">i64</a>,
nsecs: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>
) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt;&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.timestamp_millis" class="fn">timestamp_millis</a>(&amp;self, millis: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i64.html">i64</a>) -&gt; <a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.timestamp_millis_opt" class="fn">timestamp_millis_opt</a>(&amp;self, millis: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i64.html">i64</a>) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt;&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.timestamp_nanos" class="fn">timestamp_nanos</a>(&amp;self, nanos: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i64.html">i64</a>) -&gt; <a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.timestamp_micros" class="fn">timestamp_micros</a>(&amp;self, micros: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i64.html">i64</a>) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt;&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.datetime_from_str" class="fn">datetime_from_str</a>(
&amp;self,
s: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</a>,
fmt: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</a>
) -&gt; <a class="type" href="../format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt;&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.from_local_date" class="fn">from_local_date</a>(&amp;self, local: &amp;<a class="struct" href="../naive/struct.NaiveDate.html" title="struct chrono::naive::NaiveDate">NaiveDate</a>) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt;&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.from_local_datetime" class="fn">from_local_datetime</a>(
&amp;self,
local: &amp;<a class="struct" href="../naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a>
) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt;&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.from_utc_date" class="fn">from_utc_date</a>(&amp;self, utc: &amp;<a class="struct" href="../naive/struct.NaiveDate.html" title="struct chrono::naive::NaiveDate">NaiveDate</a>) -&gt; <a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.from_utc_datetime" class="fn">from_utc_datetime</a>(&amp;self, utc: &amp;<a class="struct" href="../naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a>) -&gt; <a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt; { ... }
</details>}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The time zone.</p>
<p>The methods here are the primarily constructors for <a href="../struct.Date.html"><code>Date</code></a> and
<a href="../struct.DateTime.html"><code>DateTime</code></a> types.</p>
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Offset" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#220">source</a><h4 class="code-header">type <a href="#associatedtype.Offset" class="associatedtype">Offset</a>: <a class="trait" href="trait.Offset.html" title="trait chrono::offset::Offset">Offset</a></h4></section></summary><div class="docblock"><p>An associated offset type.
This type is used to store the actual offset in date and time types.
The original <code>TimeZone</code> value can be recovered via <code>TimeZone::from_offset</code>.</p>
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.from_offset" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#481">source</a><h4 class="code-header">fn <a href="#tymethod.from_offset" class="fn">from_offset</a>(offset: &amp;Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Reconstructs the time zone from the offset.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.offset_from_local_date" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#484">source</a><h4 class="code-header">fn <a href="#tymethod.offset_from_local_date" class="fn">offset_from_local_date</a>(&amp;self, local: &amp;<a class="struct" href="../naive/struct.NaiveDate.html" title="struct chrono::naive::NaiveDate">NaiveDate</a>) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>&gt;</h4></section></summary><div class="docblock"><p>Creates the offset(s) for given local <code>NaiveDate</code> if possible.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.offset_from_local_datetime" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#487">source</a><h4 class="code-header">fn <a href="#tymethod.offset_from_local_datetime" class="fn">offset_from_local_datetime</a>(
&amp;self,
local: &amp;<a class="struct" href="../naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a>
) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>&gt;</h4></section></summary><div class="docblock"><p>Creates the offset(s) for given local <code>NaiveDateTime</code> if possible.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.offset_from_utc_date" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#508">source</a><h4 class="code-header">fn <a href="#tymethod.offset_from_utc_date" class="fn">offset_from_utc_date</a>(&amp;self, utc: &amp;<a class="struct" href="../naive/struct.NaiveDate.html" title="struct chrono::naive::NaiveDate">NaiveDate</a>) -&gt; Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a></h4></section></summary><div class="docblock"><p>Creates the offset for given UTC <code>NaiveDate</code>. This cannot fail.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.offset_from_utc_datetime" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#511">source</a><h4 class="code-header">fn <a href="#tymethod.offset_from_utc_datetime" class="fn">offset_from_utc_datetime</a>(&amp;self, utc: &amp;<a class="struct" href="../naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a>) -&gt; Self::<a class="associatedtype" href="trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a></h4></section></summary><div class="docblock"><p>Creates the offset for given UTC <code>NaiveDateTime</code>. This cannot fail.</p>
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.with_ymd_and_hms" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#227-241">source</a><h4 class="code-header">fn <a href="#method.with_ymd_and_hms" class="fn">with_ymd_and_hms</a>(
&amp;self,
year: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i32.html">i32</a>,
month: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>,
day: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>,
hour: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>,
min: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>,
sec: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>
) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt;&gt;</h4></section></summary><div class="docblock"><p>Make a new <code>DateTime</code> from year, month, day, time components and current time zone.</p>
<p>This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.</p>
<p>Returns <code>LocalResult::None</code> on invalid input data.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.ymd" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#252-254">source</a><h4 class="code-header">fn <a href="#method.ymd" class="fn">ymd</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i32.html">i32</a>, month: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>, day: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>) -&gt; <a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>with_ymd_and_hms()</code> instead</span></div></span><div class="docblock"><p>Makes a new <code>Date</code> from year, month, day and the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Panics on the out-of-range date, invalid month and/or day.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.ymd_opt" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#265-270">source</a><h4 class="code-header">fn <a href="#method.ymd_opt" class="fn">ymd_opt</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i32.html">i32</a>, month: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>, day: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt;&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>with_ymd_and_hms()</code> instead</span></div></span><div class="docblock"><p>Makes a new <code>Date</code> from year, month, day and the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Returns <code>None</code> on the out-of-range date, invalid month and/or day.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.yo" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#284-286">source</a><h4 class="code-header">fn <a href="#method.yo" class="fn">yo</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i32.html">i32</a>, ordinal: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>) -&gt; <a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>from_local_datetime()</code> with a <code>NaiveDateTime</code> instead</span></div></span><div class="docblock"><p>Makes a new <code>Date</code> from year, day of year (DOY or “ordinal”) and the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Panics on the out-of-range date and/or invalid DOY.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.yo_opt" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#300-305">source</a><h4 class="code-header">fn <a href="#method.yo_opt" class="fn">yo_opt</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i32.html">i32</a>, ordinal: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt;&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>from_local_datetime()</code> with a <code>NaiveDateTime</code> instead</span></div></span><div class="docblock"><p>Makes a new <code>Date</code> from year, day of year (DOY or “ordinal”) and the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Returns <code>None</code> on the out-of-range date and/or invalid DOY.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.isoywd" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#321-323">source</a><h4 class="code-header">fn <a href="#method.isoywd" class="fn">isoywd</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i32.html">i32</a>, week: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>, weekday: <a class="enum" href="../enum.Weekday.html" title="enum chrono::Weekday">Weekday</a>) -&gt; <a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>from_local_datetime()</code> with a <code>NaiveDateTime</code> instead</span></div></span><div class="docblock"><p>Makes a new <code>Date</code> from ISO week date (year and week number), day of the week (DOW) and
the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.
The resulting <code>Date</code> may have a different year from the input year.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Panics on the out-of-range date and/or invalid week number.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.isoywd_opt" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#339-344">source</a><h4 class="code-header">fn <a href="#method.isoywd_opt" class="fn">isoywd_opt</a>(
&amp;self,
year: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i32.html">i32</a>,
week: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>,
weekday: <a class="enum" href="../enum.Weekday.html" title="enum chrono::Weekday">Weekday</a>
) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt;&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>from_local_datetime()</code> with a <code>NaiveDateTime</code> instead</span></div></span><div class="docblock"><p>Makes a new <code>Date</code> from ISO week date (year and week number), day of the week (DOW) and
the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.
The resulting <code>Date</code> may have a different year from the input year.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Returns <code>None</code> on the out-of-range date and/or invalid week number.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.timestamp" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#359-361">source</a><h4 class="code-header">fn <a href="#method.timestamp" class="fn">timestamp</a>(&amp;self, secs: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i64.html">i64</a>, nsecs: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>) -&gt; <a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>timestamp_opt()</code> instead</span></div></span><div class="docblock"><p>Makes a new <code>DateTime</code> from the number of non-leap seconds
since January 1, 1970 0:00:00 UTC (aka “UNIX timestamp”)
and the number of nanoseconds since the last whole non-leap second.</p>
<p>The nanosecond part can exceed 1,000,000,000 in order to represent a
<a href="../naive/struct.NaiveTime.html#leap-second-handling" title="struct chrono::naive::NaiveTime">leap second</a>, but only when <code>secs % 60 == 59</code>.
(The true “UNIX timestamp” cannot represent a leap second unambiguously.)</p>
<h5 id="panics"><a href="#panics">Panics</a></h5>
<p>Panics on the out-of-range number of seconds and/or invalid nanosecond,
for a non-panicking version see <a href="#method.timestamp_opt"><code>timestamp_opt</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.timestamp_opt" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#383-388">source</a><h4 class="code-header">fn <a href="#method.timestamp_opt" class="fn">timestamp_opt</a>(&amp;self, secs: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i64.html">i64</a>, nsecs: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt;&gt;</h4></section></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the number of non-leap seconds
since January 1, 1970 0:00:00 UTC (aka “UNIX timestamp”)
and the number of nanoseconds since the last whole non-leap second.</p>
<p>The nanosecond part can exceed 1,000,000,000 in order to represent a
<a href="../naive/struct.NaiveTime.html#leap-second-handling" title="struct chrono::naive::NaiveTime">leap second</a>, but only when <code>secs % 60 == 59</code>.
(The true “UNIX timestamp” cannot represent a leap second unambiguously.)</p>
<h5 id="errors"><a href="#errors">Errors</a></h5>
<p>Returns <code>LocalResult::None</code> on out-of-range number of seconds and/or
invalid nanosecond, otherwise always returns <code>LocalResult::Single</code>.</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>chrono::{Utc, TimeZone};
<span class="macro">assert_eq!</span>(Utc.timestamp_opt(<span class="number">1431648000</span>, <span class="number">0</span>).unwrap().to_string(), <span class="string">"2015-05-15 00:00:00 UTC"</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.timestamp_millis" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#396-398">source</a><h4 class="code-header">fn <a href="#method.timestamp_millis" class="fn">timestamp_millis</a>(&amp;self, millis: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i64.html">i64</a>) -&gt; <a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>timestamp_millis_opt()</code> instead</span></div></span><div class="docblock"><p>Makes a new <code>DateTime</code> from the number of non-leap milliseconds
since January 1, 1970 0:00:00 UTC (aka “UNIX timestamp”).</p>
<p>Panics on out-of-range number of milliseconds for a non-panicking
version see <a href="#method.timestamp_millis_opt"><code>timestamp_millis_opt</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.timestamp_millis_opt" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#417-422">source</a><h4 class="code-header">fn <a href="#method.timestamp_millis_opt" class="fn">timestamp_millis_opt</a>(&amp;self, millis: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i64.html">i64</a>) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt;&gt;</h4></section></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the number of non-leap milliseconds
since January 1, 1970 0:00:00 UTC (aka “UNIX timestamp”).</p>
<p>Returns <code>LocalResult::None</code> on out-of-range number of milliseconds
and/or invalid nanosecond, otherwise always returns
<code>LocalResult::Single</code>.</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>chrono::{Utc, TimeZone, LocalResult};
<span class="kw">match </span>Utc.timestamp_millis_opt(<span class="number">1431648000</span>) {
LocalResult::Single(dt) =&gt; <span class="macro">assert_eq!</span>(dt.timestamp(), <span class="number">1431648</span>),
<span class="kw">_ </span>=&gt; <span class="macro">panic!</span>(<span class="string">"Incorrect timestamp_millis"</span>),
};</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.timestamp_nanos" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#437-444">source</a><h4 class="code-header">fn <a href="#method.timestamp_nanos" class="fn">timestamp_nanos</a>(&amp;self, nanos: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i64.html">i64</a>) -&gt; <a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt;</h4></section></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the number of non-leap nanoseconds
since January 1, 1970 0:00:00 UTC (aka “UNIX timestamp”).</p>
<p>Unlike <a href="#method.timestamp_millis"><code>timestamp_millis</code></a>, this never
panics.</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>chrono::{Utc, TimeZone};
<span class="macro">assert_eq!</span>(Utc.timestamp_nanos(<span class="number">1431648000000000</span>).timestamp(), <span class="number">1431648</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.timestamp_micros" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#455-460">source</a><h4 class="code-header">fn <a href="#method.timestamp_micros" class="fn">timestamp_micros</a>(&amp;self, micros: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.i64.html">i64</a>) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt;&gt;</h4></section></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the number of non-leap microseconds
since January 1, 1970 0:00:00 UTC (aka “UNIX timestamp”).</p>
<p>#Example</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>chrono::{Utc, TimeZone};
<span class="macro">assert_eq!</span>(Utc.timestamp_micros(<span class="number">1431648000000</span>).unwrap().timestamp(), <span class="number">1431648</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.datetime_from_str" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#474-478">source</a><h4 class="code-header">fn <a href="#method.datetime_from_str" class="fn">datetime_from_str</a>(&amp;self, s: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</a>, fmt: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</a>) -&gt; <a class="type" href="../format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt;&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.29: use <code>DateTime::parse_from_str</code> instead</span></div></span><div class="docblock"><p>Parses a string with the specified format string and returns a
<code>DateTime</code> with the current offset.</p>
<p>See the <a href="../format/strftime/index.html" title="mod chrono::format::strftime"><code>crate::format::strftime</code></a> module on the
supported escape sequences.</p>
<p>If the to-be-parsed string includes an offset, it <em>must</em> match the
offset of the TimeZone, otherwise an error will be returned.</p>
<p>See also <a href="../struct.DateTime.html#method.parse_from_str" title="associated function chrono::DateTime::parse_from_str"><code>DateTime::parse_from_str</code></a> which gives a <a href="../struct.DateTime.html" title="struct chrono::DateTime"><code>DateTime</code></a> with
parsed <a href="struct.FixedOffset.html" title="struct chrono::offset::FixedOffset"><code>FixedOffset</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_local_date" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#493-498">source</a><h4 class="code-header">fn <a href="#method.from_local_date" class="fn">from_local_date</a>(&amp;self, local: &amp;<a class="struct" href="../naive/struct.NaiveDate.html" title="struct chrono::naive::NaiveDate">NaiveDate</a>) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt;&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>from_local_datetime()</code> instead</span></div></span><div class="docblock"><p>Converts the local <code>NaiveDate</code> to the timezone-aware <code>Date</code> if possible.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_local_datetime" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#502-505">source</a><h4 class="code-header">fn <a href="#method.from_local_datetime" class="fn">from_local_datetime</a>(
&amp;self,
local: &amp;<a class="struct" href="../naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a>
) -&gt; <a class="enum" href="enum.LocalResult.html" title="enum chrono::offset::LocalResult">LocalResult</a>&lt;<a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt;&gt;</h4></section></summary><div class="docblock"><p>Converts the local <code>NaiveDateTime</code> to the timezone-aware <code>DateTime</code> if possible.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_utc_date" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#518-520">source</a><h4 class="code-header">fn <a href="#method.from_utc_date" class="fn">from_utc_date</a>(&amp;self, utc: &amp;<a class="struct" href="../naive/struct.NaiveDate.html" title="struct chrono::naive::NaiveDate">NaiveDate</a>) -&gt; <a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: use <code>from_utc_datetime()</code> instead</span></div></span><div class="docblock"><p>Converts the UTC <code>NaiveDate</code> to the local time.
The UTC is continuous and thus this cannot fail (but can give the duplicate local time).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_utc_datetime" class="method"><a class="src rightside" href="../../src/chrono/offset/mod.rs.html#525-527">source</a><h4 class="code-header">fn <a href="#method.from_utc_datetime" class="fn">from_utc_datetime</a>(&amp;self, utc: &amp;<a class="struct" href="../naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a>) -&gt; <a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt;</h4></section></summary><div class="docblock"><p>Converts the UTC <code>NaiveDateTime</code> to the local time.
The UTC is continuous and thus this cannot fail (but can give the duplicate local time).</p>
</div></details></div><h2 id="object-safety" class="section-header">Object Safety<a href="#object-safety" class="anchor">§</a></h2><div class="object-safety-info">This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.76.0/reference/items/traits.html#object-safety">object safe</a>.</div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-TimeZone-for-FixedOffset" class="impl"><a class="src rightside" href="../../src/chrono/offset/fixed.rs.html#126-146">source</a><a href="#impl-TimeZone-for-FixedOffset" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a> for <a class="struct" href="struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Offset-1" class="associatedtype trait-impl"><a href="#associatedtype.Offset-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Offset" class="associatedtype">Offset</a> = <a class="struct" href="struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TimeZone-for-Local" class="impl"><a class="src rightside" href="../../src/chrono/offset/local/mod.rs.html#152-178">source</a><a href="#impl-TimeZone-for-Local" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a> for <a class="struct" href="struct.Local.html" title="struct chrono::offset::Local">Local</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Offset-2" class="associatedtype trait-impl"><a href="#associatedtype.Offset-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Offset" class="associatedtype">Offset</a> = <a class="struct" href="struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TimeZone-for-Utc" class="impl"><a class="src rightside" href="../../src/chrono/offset/utc.rs.html#111-131">source</a><a href="#impl-TimeZone-for-Utc" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a> for <a class="struct" href="struct.Utc.html" title="struct chrono::offset::Utc">Utc</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Offset-3" class="associatedtype trait-impl"><a href="#associatedtype.Offset-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Offset" class="associatedtype">Offset</a> = <a class="struct" href="struct.Utc.html" title="struct chrono::offset::Utc">Utc</a></h4></section></div></details></div><script src="../../trait.impl/chrono/offset/trait.TimeZone.js" async></script></section></div></main></body></html>