This repository has been archived on 2022-04-04. You can view files and clone it, but cannot push or open issues or pull requests.
ludum-dare-50/rustdoc/chrono/offset/trait.TimeZone.html

145 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."><meta name="keywords" content="rust, rustlang, rust-lang, TimeZone"><title>TimeZone in chrono::offset - 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 src="../../crates.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 trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a class="sidebar-logo" href="../../chrono/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
</a><h2 class="location">Trait TimeZone</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#associated-types">Associated Types</a></h3><div class="sidebar-links"><a href="#associatedtype.Offset">Offset</a></div><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><div class="sidebar-links"><a href="#tymethod.from_offset">from_offset</a><a href="#tymethod.offset_from_local_date">offset_from_local_date</a><a href="#tymethod.offset_from_local_datetime">offset_from_local_datetime</a><a href="#tymethod.offset_from_utc_date">offset_from_utc_date</a><a href="#tymethod.offset_from_utc_datetime">offset_from_utc_datetime</a></div><h3 class="sidebar-title"><a href="#provided-methods">Provided Methods</a></h3><div class="sidebar-links"><a href="#method.datetime_from_str">datetime_from_str</a><a href="#method.from_local_date">from_local_date</a><a href="#method.from_local_datetime">from_local_datetime</a><a href="#method.from_utc_date">from_utc_date</a><a href="#method.from_utc_datetime">from_utc_datetime</a><a href="#method.isoywd">isoywd</a><a href="#method.isoywd_opt">isoywd_opt</a><a href="#method.timestamp">timestamp</a><a href="#method.timestamp_millis">timestamp_millis</a><a href="#method.timestamp_millis_opt">timestamp_millis_opt</a><a href="#method.timestamp_nanos">timestamp_nanos</a><a href="#method.timestamp_opt">timestamp_opt</a><a href="#method.ymd">ymd</a><a href="#method.ymd_opt">ymd_opt</a><a href="#method.yo">yo</a><a href="#method.yo_opt">yo_opt</a></div><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div><h2 class="location">Other items in<br><a href="../index.html">chrono</a>::<wbr><a href="index.html">offset</a></h2><div id="sidebar-vars" data-name="TimeZone" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></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.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">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" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/chrono/offset/mod.rs.html#192-462" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust trait"><code>pub trait TimeZone: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.59.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="rustdoc-toggle type-contents-toggle"><summary class="hideme"><span>Show 21 methods</span></summary> fn <a href="#tymethod.from_offset" class="fnname">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;
<div class="item-spacer"></div> fn <a href="#tymethod.offset_from_local_date" class="fnname">offset_from_local_date</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local: &amp;<a class="struct" href="../naive/struct.NaiveDate.html" title="struct chrono::naive::NaiveDate">NaiveDate</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&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;;
<div class="item-spacer"></div> fn <a href="#tymethod.offset_from_local_datetime" class="fnname">offset_from_local_datetime</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local: &amp;<a class="struct" href="../naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&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;;
<div class="item-spacer"></div> fn <a href="#tymethod.offset_from_utc_date" class="fnname">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>;
<div class="item-spacer"></div> fn <a href="#tymethod.offset_from_utc_datetime" class="fnname">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>;
fn <a href="#method.ymd" class="fnname">ymd</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a>, month: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>, day: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -&gt; <a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt; { ... }
<div class="item-spacer"></div> fn <a href="#method.ymd_opt" class="fnname">ymd_opt</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;year: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;month: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;day: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&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; { ... }
<div class="item-spacer"></div> fn <a href="#method.yo" class="fnname">yo</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a>, ordinal: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -&gt; <a class="struct" href="../struct.Date.html" title="struct chrono::Date">Date</a>&lt;Self&gt; { ... }
<div class="item-spacer"></div> fn <a href="#method.yo_opt" class="fnname">yo_opt</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a>, ordinal: <a class="primitive" href="https://doc.rust-lang.org/1.59.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; { ... }
<div class="item-spacer"></div> fn <a href="#method.isoywd" class="fnname">isoywd</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a>, week: <a class="primitive" href="https://doc.rust-lang.org/1.59.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; { ... }
<div class="item-spacer"></div> fn <a href="#method.isoywd_opt" class="fnname">isoywd_opt</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;year: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;week: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;weekday: <a class="enum" href="../enum.Weekday.html" title="enum chrono::Weekday">Weekday</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&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; { ... }
<div class="item-spacer"></div> fn <a href="#method.timestamp" class="fnname">timestamp</a>(&amp;self, secs: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i64.html">i64</a>, nsecs: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -&gt; <a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt; { ... }
<div class="item-spacer"></div> fn <a href="#method.timestamp_opt" class="fnname">timestamp_opt</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;secs: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i64.html">i64</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nsecs: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&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; { ... }
<div class="item-spacer"></div> fn <a href="#method.timestamp_millis" class="fnname">timestamp_millis</a>(&amp;self, millis: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i64.html">i64</a>) -&gt; <a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt; { ... }
<div class="item-spacer"></div> fn <a href="#method.timestamp_millis_opt" class="fnname">timestamp_millis_opt</a>(&amp;self, millis: <a class="primitive" href="https://doc.rust-lang.org/1.59.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; { ... }
<div class="item-spacer"></div> fn <a href="#method.timestamp_nanos" class="fnname">timestamp_nanos</a>(&amp;self, nanos: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i64.html">i64</a>) -&gt; <a class="struct" href="../struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Self&gt; { ... }
<div class="item-spacer"></div> fn <a href="#method.datetime_from_str" class="fnname">datetime_from_str</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fmt: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&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; { ... }
<div class="item-spacer"></div> fn <a href="#method.from_local_date" class="fnname">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; { ... }
<div class="item-spacer"></div> fn <a href="#method.from_local_datetime" class="fnname">from_local_datetime</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local: &amp;<a class="struct" href="../naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&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; { ... }
<div class="item-spacer"></div> fn <a href="#method.from_utc_date" class="fnname">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; { ... }
<div class="item-spacer"></div> fn <a href="#method.from_utc_datetime" class="fnname">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></div><details class="rustdoc-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="associated-types" class="small-section-header">Associated Types<a href="#associated-types" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Offset" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#196" title="goto source code">[src]</a></div><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></div></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="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="tymethod.from_offset" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#423" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#tymethod.from_offset" class="fnname">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></div></summary><div class="docblock"><p>Reconstructs the time zone from the offset.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.offset_from_local_date" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#426" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#tymethod.offset_from_local_date" class="fnname">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></div></summary><div class="docblock"><p>Creates the offset(s) for given local <code>NaiveDate</code> if possible.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.offset_from_local_datetime" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#429" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#tymethod.offset_from_local_datetime" class="fnname">offset_from_local_datetime</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;local: &amp;<a class="struct" href="../naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a><br>) -&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></div></summary><div class="docblock"><p>Creates the offset(s) for given local <code>NaiveDateTime</code> if possible.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.offset_from_utc_date" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#446" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#tymethod.offset_from_utc_date" class="fnname">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></div></summary><div class="docblock"><p>Creates the offset for given UTC <code>NaiveDate</code>. This cannot fail.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.offset_from_utc_datetime" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#449" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#tymethod.offset_from_utc_datetime" class="fnname">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></div></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="small-section-header">Provided methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="method.ymd" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#213-215" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.ymd" class="fnname">ymd</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a>, month: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>, day: <a class="primitive" href="https://doc.rust-lang.org/1.59.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></div></summary><div class="docblock"><p>Makes a new <code>Date</code> from year, month, day and the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Panics on the out-of-range date, invalid month and/or day.</p>
<h5 id="example" class="section-header"><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">Utc</span>, <span class="ident">TimeZone</span>};
<span class="macro">assert_eq!</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">to_string</span>(), <span class="string">&quot;2015-05-15UTC&quot;</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.ymd_opt" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#233-238" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.ymd_opt" class="fnname">ymd_opt</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a>, month: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>, day: <a class="primitive" href="https://doc.rust-lang.org/1.59.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></div></summary><div class="docblock"><p>Makes a new <code>Date</code> from year, month, day and the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Returns <code>None</code> on the out-of-range date, invalid month and/or day.</p>
<h5 id="example-1" class="section-header"><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</span>::{<span class="ident">Utc</span>, <span class="ident">LocalResult</span>, <span class="ident">TimeZone</span>};
<span class="macro">assert_eq!</span>(<span class="ident">Utc</span>.<span class="ident">ymd_opt</span>(<span class="number">2015</span>, <span class="number">5</span>, <span class="number">15</span>).<span class="ident">unwrap</span>().<span class="ident">to_string</span>(), <span class="string">&quot;2015-05-15UTC&quot;</span>);
<span class="macro">assert_eq!</span>(<span class="ident">Utc</span>.<span class="ident">ymd_opt</span>(<span class="number">2000</span>, <span class="number">0</span>, <span class="number">0</span>), <span class="ident">LocalResult::None</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.yo" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#255-257" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.yo" class="fnname">yo</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a>, ordinal: <a class="primitive" href="https://doc.rust-lang.org/1.59.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></div></summary><div class="docblock"><p>Makes a new <code>Date</code> from year, day of year (DOY or “ordinal”) and the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Panics on the out-of-range date and/or invalid DOY.</p>
<h5 id="example-2" class="section-header"><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</span>::{<span class="ident">Utc</span>, <span class="ident">TimeZone</span>};
<span class="macro">assert_eq!</span>(<span class="ident">Utc</span>.<span class="ident">yo</span>(<span class="number">2015</span>, <span class="number">135</span>).<span class="ident">to_string</span>(), <span class="string">&quot;2015-05-15UTC&quot;</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.yo_opt" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#266-271" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.yo_opt" class="fnname">yo_opt</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a>, ordinal: <a class="primitive" href="https://doc.rust-lang.org/1.59.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></div></summary><div class="docblock"><p>Makes a new <code>Date</code> from year, day of year (DOY or “ordinal”) and the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Returns <code>None</code> on the out-of-range date and/or invalid DOY.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.isoywd" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#290-292" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.isoywd" class="fnname">isoywd</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a>, week: <a class="primitive" href="https://doc.rust-lang.org/1.59.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></div></summary><div class="docblock"><p>Makes a new <code>Date</code> from ISO week date (year and week number), day of the week (DOW) and
the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.
The resulting <code>Date</code> may have a different year from the input year.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Panics on the out-of-range date and/or invalid week number.</p>
<h5 id="example-3" class="section-header"><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">Utc</span>, <span class="ident">Weekday</span>, <span class="ident">TimeZone</span>};
<span class="macro">assert_eq!</span>(<span class="ident">Utc</span>.<span class="ident">isoywd</span>(<span class="number">2015</span>, <span class="number">20</span>, <span class="ident">Weekday::Fri</span>).<span class="ident">to_string</span>(), <span class="string">&quot;2015-05-15UTC&quot;</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.isoywd_opt" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#303-308" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.isoywd_opt" class="fnname">isoywd_opt</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;year: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;week: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;weekday: <a class="enum" href="../enum.Weekday.html" title="enum chrono::Weekday">Weekday</a><br>) -&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></div></summary><div class="docblock"><p>Makes a new <code>Date</code> from ISO week date (year and week number), day of the week (DOW) and
the current time zone.
This assumes the proleptic Gregorian calendar, with the year 0 being 1 BCE.
The resulting <code>Date</code> may have a different year from the input year.</p>
<p>The time zone normally does not affect the date (unless it is between UTC-24 and UTC+24),
but it will propagate to the <code>DateTime</code> values constructed via this date.</p>
<p>Returns <code>None</code> on the out-of-range date and/or invalid week number.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.timestamp" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#324-326" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.timestamp" class="fnname">timestamp</a>(&amp;self, secs: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i64.html">i64</a>, nsecs: <a class="primitive" href="https://doc.rust-lang.org/1.59.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></div></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>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>
<h5 id="example-4" class="section-header"><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</span>::{<span class="ident">Utc</span>, <span class="ident">TimeZone</span>};
<span class="macro">assert_eq!</span>(<span class="ident">Utc</span>.<span class="ident">timestamp</span>(<span class="number">1431648000</span>, <span class="number">0</span>).<span class="ident">to_string</span>(), <span class="string">&quot;2015-05-15 00:00:00 UTC&quot;</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.timestamp_opt" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#334-339" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.timestamp_opt" class="fnname">timestamp_opt</a>(&amp;self, secs: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i64.html">i64</a>, nsecs: <a class="primitive" href="https://doc.rust-lang.org/1.59.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></div></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>Returns <code>LocalResult::None</code> on out-of-range number of seconds and/or
invalid nanosecond, otherwise always returns <code>LocalResult::Single</code>.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.timestamp_millis" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#354-356" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.timestamp_millis" class="fnname">timestamp_millis</a>(&amp;self, millis: <a class="primitive" href="https://doc.rust-lang.org/1.59.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></div></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the number of non-leap milliseconds
since January 1, 1970 0:00:00 UTC (aka “UNIX timestamp”).</p>
<p>Panics on out-of-range number of milliseconds for a non-panicking
version see <a href="#method.timestamp_millis_opt"><code>timestamp_millis_opt</code></a>.</p>
<h5 id="example-5" class="section-header"><a href="#example-5">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">Utc</span>, <span class="ident">TimeZone</span>};
<span class="macro">assert_eq!</span>(<span class="ident">Utc</span>.<span class="ident">timestamp_millis</span>(<span class="number">1431648000</span>).<span class="ident">timestamp</span>(), <span class="number">1431648</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.timestamp_millis_opt" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#375-382" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.timestamp_millis_opt" class="fnname">timestamp_millis_opt</a>(&amp;self, millis: <a class="primitive" href="https://doc.rust-lang.org/1.59.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></div></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-6" class="section-header"><a href="#example-6">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">Utc</span>, <span class="ident">TimeZone</span>, <span class="ident">LocalResult</span>};
<span class="kw">match</span> <span class="ident">Utc</span>.<span class="ident">timestamp_millis_opt</span>(<span class="number">1431648000</span>) {
<span class="ident">LocalResult::Single</span>(<span class="ident">dt</span>) =&gt; <span class="macro">assert_eq!</span>(<span class="ident">dt</span>.<span class="ident">timestamp</span>(), <span class="number">1431648</span>),
<span class="kw">_</span> =&gt; <span class="macro">panic!</span>(<span class="string">&quot;Incorrect timestamp_millis&quot;</span>),
};</code></pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.timestamp_nanos" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#397-404" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.timestamp_nanos" class="fnname">timestamp_nanos</a>(&amp;self, nanos: <a class="primitive" href="https://doc.rust-lang.org/1.59.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></div></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-7" class="section-header"><a href="#example-7">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">Utc</span>, <span class="ident">TimeZone</span>};
<span class="macro">assert_eq!</span>(<span class="ident">Utc</span>.<span class="ident">timestamp_nanos</span>(<span class="number">1431648000000000</span>).<span class="ident">timestamp</span>(), <span class="number">1431648</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.datetime_from_str" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#416-420" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.datetime_from_str" class="fnname">datetime_from_str</a>(&amp;self, s: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>, fmt: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.59.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></div></summary><div class="docblock"><p>Parses a string with the specified format string and
returns a <code>DateTime</code> with the current offset.
See the <a href="../format/strftime/index.html"><code>format::strftime</code> module</a>
on the supported escape sequences.</p>
<p>If the format does not include offsets, the current offset is assumed;
otherwise the input should have a matching UTC offset.</p>
<p>See also <code>DateTime::parse_from_str</code> which gives a local <code>DateTime</code>
with parsed <code>FixedOffset</code>.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.from_local_date" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#432-437" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.from_local_date" class="fnname">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></div></summary><div class="docblock"><p>Converts the local <code>NaiveDate</code> to the timezone-aware <code>Date</code> if possible.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.from_local_datetime" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#440-443" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.from_local_datetime" class="fnname">from_local_datetime</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;local: &amp;<a class="struct" href="../naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a><br>) -&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></div></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="rustdoc-toggle" open><summary><div id="method.from_utc_date" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#453-455" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.from_utc_date" class="fnname">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></div></summary><div class="docblock"><p>Converts the UTC <code>NaiveDate</code> to the local time.
The UTC is continuous and thus this cannot fail (but can give the duplicate local time).</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.from_utc_datetime" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/mod.rs.html#459-461" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.from_utc_datetime" class="fnname">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></div></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="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TimeZone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/fixed.rs.html#101-121" title="goto source code">[src]</a></div><a href="#impl-TimeZone" class="anchor"></a><h3 class="code-header in-band">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></div></summary><div class="impl-items"><div id="associatedtype.Offset-1" class="type trait-impl has-srclink"><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></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TimeZone-1" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/local.rs.html#117-194" title="goto source code">[src]</a></div><a href="#impl-TimeZone-1" class="anchor"></a><h3 class="code-header in-band">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></div></summary><div class="impl-items"><div id="associatedtype.Offset-2" class="type trait-impl has-srclink"><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></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TimeZone-2" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/chrono/offset/utc.rs.html#62-82" title="goto source code">[src]</a></div><a href="#impl-TimeZone-2" class="anchor"></a><h3 class="code-header in-band">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></div></summary><div class="impl-items"><div id="associatedtype.Offset-3" class="type trait-impl has-srclink"><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></div></div></details></div><script type="text/javascript" src="../../implementors/chrono/offset/trait.TimeZone.js" async></script></section><section id="search" class="content hidden"></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.59.0 (9d1b2106e 2022-02-23)" ></div>
</body></html>